<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.9.0">
  <meta charset="utf-8">
  
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Tampermonkey Script | Zachary&#39;s blog</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="Using tampermonkey to fill studylink automatically which used a lot of jquery api, this is a good backup to remind the usage of  a practical scenario.">
<meta name="keywords" content="jQuery">
<meta property="og:type" content="article">
<meta property="og:title" content="Tampermonkey Script">
<meta property="og:url" content="http://dontcry2013.github.io/2017/03/31/tampermonkey-script/index.html">
<meta property="og:site_name" content="Zachary&#39;s blog">
<meta property="og:description" content="Using tampermonkey to fill studylink automatically which used a lot of jquery api, this is a good backup to remind the usage of  a practical scenario.">
<meta property="og:locale" content="en">
<meta property="og:updated_time" content="2019-12-12T03:29:04.170Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Tampermonkey Script">
<meta name="twitter:description" content="Using tampermonkey to fill studylink automatically which used a lot of jquery api, this is a good backup to remind the usage of  a practical scenario.">
  
    <link rel="alternative" href="/atom.xml" title="Zachary&#39;s blog" type="application/atom+xml">
  
  
    <link rel="icon" href="/img/favicon.png">
  
  <link rel="stylesheet" href="/css/style.css">
  
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?e907b20dbb2f8d2eb9402532629ec091";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>

</head>
</html>
<body>
  <div id="container">
    <div class="left-col">
    <div class="overlay"></div>
<div class="intrude-less">
	<header id="header" class="inner">
		<a href="/" class="profilepic">
			
			<img lazy-src="/img/litten.png" class="js-avatar">
			
		</a>

		<hgroup>
		  <h1 class="header-author"><a href="/">Zachary</a></h1>
		</hgroup>

		
		<p class="header-subtitle">No pain, no gain</p>
		

		
			<div class="switch-btn">
				<div class="icon">
					<div class="icon-ctn">
						<div class="icon-wrap icon-house" data-idx="0">
							<div class="birdhouse"></div>
							<div class="birdhouse_holes"></div>
						</div>
						<div class="icon-wrap icon-ribbon hide" data-idx="1">
							<div class="ribbon"></div>
						</div>
						
						<div class="icon-wrap icon-link hide" data-idx="2">
							<div class="loopback_l"></div>
							<div class="loopback_r"></div>
						</div>
						
						
						<div class="icon-wrap icon-me hide" data-idx="3">
							<div class="user"></div>
							<div class="shoulder"></div>
						</div>
						
					</div>
					
				</div>
				<div class="tips-box hide">
					<div class="tips-arrow"></div>
					<ul class="tips-inner">
						<li>Menu</li>
						<li>Tags</li>
						
						<li>Links</li>
						
						
						<li>About</li>
						
					</ul>
				</div>
			</div>
		

		<div class="switch-area">
			<div class="switch-wrap">
				<section class="switch-part switch-part1">
					<nav class="header-menu">
						<ul>
						
							<li><a href="/">homepage</a></li>
				        
							<li><a href="/archives">archives</a></li>
				        
						</ul>
					</nav>
					<nav class="header-nav">
						<div class="social">
							
								<a class="github" target="_blank" href="https://github.com/dontcry2013" title="github">github</a>
					        
								<a class="weibo" target="_blank" href="http://weibo.com/u/2278451152" title="weibo">weibo</a>
					        
						</div>
					</nav>
				</section>
				
				
				<section class="switch-part switch-part2">
					<div class="widget tagcloud" id="js-tagcloud">
						<a href="/tags/android/" style="font-size: 14px;">Android</a> <a href="/tags/apache/" style="font-size: 10px;">Apache</a> <a href="/tags/c/" style="font-size: 14px;">C</a> <a href="/tags/css/" style="font-size: 10px;">CSS</a> <a href="/tags/closure/" style="font-size: 10px;">Closure</a> <a href="/tags/command/" style="font-size: 12px;">Command</a> <a href="/tags/es2017/" style="font-size: 14px;">ES2017</a> <a href="/tags/es5/" style="font-size: 18px;">ES5</a> <a href="/tags/es6/" style="font-size: 18px;">ES6</a> <a href="/tags/example/" style="font-size: 10px;">Example</a> <a href="/tags/fiddler/" style="font-size: 10px;">Fiddler</a> <a href="/tags/git/" style="font-size: 12px;">Git</a> <a href="/tags/github/" style="font-size: 14px;">GitHub</a> <a href="/tags/html/" style="font-size: 10px;">HTML</a> <a href="/tags/http/" style="font-size: 10px;">HTTP</a> <a href="/tags/hexo/" style="font-size: 12px;">Hexo</a> <a href="/tags/issue/" style="font-size: 10px;">Issue</a> <a href="/tags/jni/" style="font-size: 10px;">JNI</a> <a href="/tags/java/" style="font-size: 14px;">Java</a> <a href="/tags/mandarin/" style="font-size: 16px;">Mandarin</a> <a href="/tags/markdown/" style="font-size: 10px;">Markdown</a> <a href="/tags/mongodb/" style="font-size: 10px;">MongoDB</a> <a href="/tags/ndk/" style="font-size: 10px;">NDK</a> <a href="/tags/node-js/" style="font-size: 14px;">Node.js</a> <a href="/tags/objective-c/" style="font-size: 10px;">Objective-C</a> <a href="/tags/oracle/" style="font-size: 12px;">Oracle</a> <a href="/tags/php/" style="font-size: 10px;">PHP</a> <a href="/tags/prototype/" style="font-size: 12px;">Prototype</a> <a href="/tags/proxy/" style="font-size: 10px;">Proxy</a> <a href="/tags/react-native/" style="font-size: 10px;">React Native</a> <a href="/tags/sql/" style="font-size: 10px;">SQL</a> <a href="/tags/sublime/" style="font-size: 10px;">Sublime</a> <a href="/tags/todo/" style="font-size: 10px;">TODO</a> <a href="/tags/travis/" style="font-size: 10px;">Travis</a> <a href="/tags/ubuntu/" style="font-size: 10px;">Ubuntu</a> <a href="/tags/webview/" style="font-size: 10px;">Webview</a> <a href="/tags/jquery/" style="font-size: 12px;">jQuery</a> <a href="/tags/prototype/" style="font-size: 10px;">prototype</a> <a href="/tags/碎碎念/" style="font-size: 20px;">碎碎念</a> <a href="/tags/英语/" style="font-size: 10px;">英语</a>
					</div>
				</section>
				
				
				
				<section class="switch-part switch-part3">
					<div id="js-friends">
					
			          <a target="_blank" class="main-nav-link switch-friends-link" href="http://www.thirdtea.com/">三号茶馆</a>
			        
			          <a target="_blank" class="main-nav-link switch-friends-link" href="http://www.jianshu.com/users/c2f3ff613436/latest_articles">猫哥学前班</a>
			        
			        </div>
				</section>
				

				
				
				<section class="switch-part switch-part4">
				
					<div id="js-aboutme">我是谁，我从哪里来，我到哪里去？我就是我，是颜色不一样的吃货…</div>
				</section>
				
			</div>
		</div>
	</header>				
</div>

    </div>
    <div class="mid-col">
      <nav id="mobile-nav">
  	<div class="overlay">
  		<div class="slider-trigger"></div>
  		<h1 class="header-author js-mobile-header hide">Zachary</h1>
  	</div>
	<div class="intrude-less">
		<header id="header" class="inner">
			<div class="profilepic">
			
				<img lazy-src="/img/litten.png" class="js-avatar">
			
			</div>
			<hgroup>
			  <h1 class="header-author">Zachary</h1>
			</hgroup>
			
			<p class="header-subtitle">No pain, no gain</p>
			
			<nav class="header-menu">
				<ul>
				
					<li><a href="/">homepage</a></li>
		        
					<li><a href="/archives">archives</a></li>
		        
		        <div class="clearfix"></div>
				</ul>
			</nav>
			<nav class="header-nav">
				<div class="social">
					
						<a class="github" target="_blank" href="https://github.com/dontcry2013" title="github">github</a>
			        
						<a class="weibo" target="_blank" href="http://weibo.com/u/2278451152" title="weibo">weibo</a>
			        
				</div>
			</nav>
		</header>				
	</div>
</nav>

      <div class="body-wrap"><article id="post-tampermonkey-script" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/2017/03/31/tampermonkey-script/" class="article-date">
  	<time datetime="2017-03-31T11:48:34.000Z" itemprop="datePublished">2017-03-31</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      Tampermonkey Script
    </h1>
  

      </header>
      
      <div class="article-info article-info-post">
        
	<div class="article-tag tagcloud">
		<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/jquery/">jQuery</a></li></ul>
	</div>

        
	<div class="article-category tagcloud">
	<a class="article-category-link" href="/categories/tools/">Tools</a><a class="article-category-link" href="/categories/tools/javascript/">JavaScript</a>
	</div>


        <div class="clearfix"></div>
      </div>
      
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>Using tampermonkey to fill studylink automatically which used a lot of jquery api, this is a good backup to remind the usage of  a practical scenario.<br><a id="more"></a></p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br><span class="line">217</span><br><span class="line">218</span><br><span class="line">219</span><br><span class="line">220</span><br><span class="line">221</span><br><span class="line">222</span><br><span class="line">223</span><br><span class="line">224</span><br><span class="line">225</span><br><span class="line">226</span><br><span class="line">227</span><br><span class="line">228</span><br><span class="line">229</span><br><span class="line">230</span><br><span class="line">231</span><br><span class="line">232</span><br><span class="line">233</span><br><span class="line">234</span><br><span class="line">235</span><br><span class="line">236</span><br><span class="line">237</span><br><span class="line">238</span><br><span class="line">239</span><br><span class="line">240</span><br><span class="line">241</span><br><span class="line">242</span><br><span class="line">243</span><br><span class="line">244</span><br><span class="line">245</span><br><span class="line">246</span><br><span class="line">247</span><br><span class="line">248</span><br><span class="line">249</span><br><span class="line">250</span><br><span class="line">251</span><br><span class="line">252</span><br><span class="line">253</span><br><span class="line">254</span><br><span class="line">255</span><br><span class="line">256</span><br><span class="line">257</span><br><span class="line">258</span><br><span class="line">259</span><br><span class="line">260</span><br><span class="line">261</span><br><span class="line">262</span><br><span class="line">263</span><br><span class="line">264</span><br><span class="line">265</span><br><span class="line">266</span><br><span class="line">267</span><br><span class="line">268</span><br><span class="line">269</span><br><span class="line">270</span><br><span class="line">271</span><br><span class="line">272</span><br><span class="line">273</span><br><span class="line">274</span><br><span class="line">275</span><br><span class="line">276</span><br><span class="line">277</span><br><span class="line">278</span><br><span class="line">279</span><br><span class="line">280</span><br><span class="line">281</span><br><span class="line">282</span><br><span class="line">283</span><br><span class="line">284</span><br><span class="line">285</span><br><span class="line">286</span><br><span class="line">287</span><br><span class="line">288</span><br><span class="line">289</span><br><span class="line">290</span><br><span class="line">291</span><br><span class="line">292</span><br><span class="line">293</span><br><span class="line">294</span><br><span class="line">295</span><br><span class="line">296</span><br><span class="line">297</span><br><span class="line">298</span><br><span class="line">299</span><br><span class="line">300</span><br><span class="line">301</span><br><span class="line">302</span><br><span class="line">303</span><br><span class="line">304</span><br><span class="line">305</span><br><span class="line">306</span><br><span class="line">307</span><br><span class="line">308</span><br><span class="line">309</span><br><span class="line">310</span><br><span class="line">311</span><br><span class="line">312</span><br><span class="line">313</span><br><span class="line">314</span><br><span class="line">315</span><br><span class="line">316</span><br><span class="line">317</span><br><span class="line">318</span><br><span class="line">319</span><br><span class="line">320</span><br><span class="line">321</span><br><span class="line">322</span><br><span class="line">323</span><br><span class="line">324</span><br><span class="line">325</span><br><span class="line">326</span><br><span class="line">327</span><br><span class="line">328</span><br><span class="line">329</span><br><span class="line">330</span><br><span class="line">331</span><br><span class="line">332</span><br><span class="line">333</span><br><span class="line">334</span><br><span class="line">335</span><br><span class="line">336</span><br><span class="line">337</span><br><span class="line">338</span><br><span class="line">339</span><br><span class="line">340</span><br><span class="line">341</span><br><span class="line">342</span><br><span class="line">343</span><br><span class="line">344</span><br><span class="line">345</span><br><span class="line">346</span><br><span class="line">347</span><br><span class="line">348</span><br><span class="line">349</span><br><span class="line">350</span><br><span class="line">351</span><br><span class="line">352</span><br><span class="line">353</span><br><span class="line">354</span><br><span class="line">355</span><br><span class="line">356</span><br><span class="line">357</span><br><span class="line">358</span><br><span class="line">359</span><br><span class="line">360</span><br><span class="line">361</span><br><span class="line">362</span><br><span class="line">363</span><br><span class="line">364</span><br><span class="line">365</span><br><span class="line">366</span><br><span class="line">367</span><br><span class="line">368</span><br><span class="line">369</span><br><span class="line">370</span><br><span class="line">371</span><br><span class="line">372</span><br><span class="line">373</span><br><span class="line">374</span><br><span class="line">375</span><br><span class="line">376</span><br><span class="line">377</span><br><span class="line">378</span><br><span class="line">379</span><br><span class="line">380</span><br><span class="line">381</span><br><span class="line">382</span><br><span class="line">383</span><br><span class="line">384</span><br><span class="line">385</span><br><span class="line">386</span><br><span class="line">387</span><br><span class="line">388</span><br><span class="line">389</span><br><span class="line">390</span><br><span class="line">391</span><br><span class="line">392</span><br><span class="line">393</span><br><span class="line">394</span><br><span class="line">395</span><br><span class="line">396</span><br><span class="line">397</span><br><span class="line">398</span><br><span class="line">399</span><br><span class="line">400</span><br><span class="line">401</span><br><span class="line">402</span><br><span class="line">403</span><br><span class="line">404</span><br><span class="line">405</span><br><span class="line">406</span><br><span class="line">407</span><br><span class="line">408</span><br><span class="line">409</span><br><span class="line">410</span><br><span class="line">411</span><br><span class="line">412</span><br><span class="line">413</span><br><span class="line">414</span><br><span class="line">415</span><br><span class="line">416</span><br><span class="line">417</span><br><span class="line">418</span><br><span class="line">419</span><br><span class="line">420</span><br><span class="line">421</span><br><span class="line">422</span><br><span class="line">423</span><br><span class="line">424</span><br><span class="line">425</span><br><span class="line">426</span><br><span class="line">427</span><br><span class="line">428</span><br><span class="line">429</span><br><span class="line">430</span><br><span class="line">431</span><br><span class="line">432</span><br><span class="line">433</span><br><span class="line">434</span><br><span class="line">435</span><br><span class="line">436</span><br><span class="line">437</span><br><span class="line">438</span><br><span class="line">439</span><br><span class="line">440</span><br><span class="line">441</span><br><span class="line">442</span><br><span class="line">443</span><br><span class="line">444</span><br><span class="line">445</span><br><span class="line">446</span><br><span class="line">447</span><br><span class="line">448</span><br><span class="line">449</span><br><span class="line">450</span><br><span class="line">451</span><br><span class="line">452</span><br><span class="line">453</span><br><span class="line">454</span><br><span class="line">455</span><br><span class="line">456</span><br><span class="line">457</span><br><span class="line">458</span><br><span class="line">459</span><br><span class="line">460</span><br><span class="line">461</span><br><span class="line">462</span><br><span class="line">463</span><br><span class="line">464</span><br><span class="line">465</span><br><span class="line">466</span><br><span class="line">467</span><br><span class="line">468</span><br><span class="line">469</span><br><span class="line">470</span><br><span class="line">471</span><br><span class="line">472</span><br><span class="line">473</span><br><span class="line">474</span><br><span class="line">475</span><br><span class="line">476</span><br><span class="line">477</span><br><span class="line">478</span><br><span class="line">479</span><br><span class="line">480</span><br><span class="line">481</span><br><span class="line">482</span><br><span class="line">483</span><br><span class="line">484</span><br><span class="line">485</span><br><span class="line">486</span><br><span class="line">487</span><br><span class="line">488</span><br><span class="line">489</span><br><span class="line">490</span><br><span class="line">491</span><br><span class="line">492</span><br><span class="line">493</span><br><span class="line">494</span><br><span class="line">495</span><br><span class="line">496</span><br><span class="line">497</span><br><span class="line">498</span><br><span class="line">499</span><br><span class="line">500</span><br><span class="line">501</span><br><span class="line">502</span><br><span class="line">503</span><br><span class="line">504</span><br><span class="line">505</span><br><span class="line">506</span><br><span class="line">507</span><br><span class="line">508</span><br><span class="line">509</span><br><span class="line">510</span><br><span class="line">511</span><br><span class="line">512</span><br><span class="line">513</span><br><span class="line">514</span><br><span class="line">515</span><br><span class="line">516</span><br><span class="line">517</span><br><span class="line">518</span><br><span class="line">519</span><br><span class="line">520</span><br><span class="line">521</span><br><span class="line">522</span><br><span class="line">523</span><br><span class="line">524</span><br><span class="line">525</span><br><span class="line">526</span><br><span class="line">527</span><br><span class="line">528</span><br><span class="line">529</span><br><span class="line">530</span><br><span class="line">531</span><br><span class="line">532</span><br><span class="line">533</span><br><span class="line">534</span><br><span class="line">535</span><br><span class="line">536</span><br><span class="line">537</span><br><span class="line">538</span><br><span class="line">539</span><br><span class="line">540</span><br><span class="line">541</span><br><span class="line">542</span><br><span class="line">543</span><br><span class="line">544</span><br><span class="line">545</span><br><span class="line">546</span><br><span class="line">547</span><br><span class="line">548</span><br><span class="line">549</span><br><span class="line">550</span><br><span class="line">551</span><br><span class="line">552</span><br><span class="line">553</span><br><span class="line">554</span><br><span class="line">555</span><br><span class="line">556</span><br><span class="line">557</span><br><span class="line">558</span><br><span class="line">559</span><br><span class="line">560</span><br><span class="line">561</span><br><span class="line">562</span><br><span class="line">563</span><br><span class="line">564</span><br><span class="line">565</span><br><span class="line">566</span><br><span class="line">567</span><br><span class="line">568</span><br><span class="line">569</span><br><span class="line">570</span><br><span class="line">571</span><br><span class="line">572</span><br><span class="line">573</span><br><span class="line">574</span><br><span class="line">575</span><br><span class="line">576</span><br><span class="line">577</span><br><span class="line">578</span><br><span class="line">579</span><br><span class="line">580</span><br><span class="line">581</span><br><span class="line">582</span><br><span class="line">583</span><br><span class="line">584</span><br><span class="line">585</span><br><span class="line">586</span><br><span class="line">587</span><br><span class="line">588</span><br><span class="line">589</span><br><span class="line">590</span><br><span class="line">591</span><br><span class="line">592</span><br><span class="line">593</span><br><span class="line">594</span><br><span class="line">595</span><br><span class="line">596</span><br><span class="line">597</span><br><span class="line">598</span><br><span class="line">599</span><br><span class="line">600</span><br><span class="line">601</span><br><span class="line">602</span><br><span class="line">603</span><br><span class="line">604</span><br><span class="line">605</span><br><span class="line">606</span><br><span class="line">607</span><br><span class="line">608</span><br><span class="line">609</span><br><span class="line">610</span><br><span class="line">611</span><br><span class="line">612</span><br><span class="line">613</span><br><span class="line">614</span><br><span class="line">615</span><br><span class="line">616</span><br><span class="line">617</span><br><span class="line">618</span><br><span class="line">619</span><br><span class="line">620</span><br><span class="line">621</span><br><span class="line">622</span><br><span class="line">623</span><br><span class="line">624</span><br><span class="line">625</span><br><span class="line">626</span><br><span class="line">627</span><br><span class="line">628</span><br><span class="line">629</span><br><span class="line">630</span><br><span class="line">631</span><br><span class="line">632</span><br><span class="line">633</span><br><span class="line">634</span><br><span class="line">635</span><br><span class="line">636</span><br><span class="line">637</span><br><span class="line">638</span><br><span class="line">639</span><br><span class="line">640</span><br><span class="line">641</span><br><span class="line">642</span><br><span class="line">643</span><br><span class="line">644</span><br><span class="line">645</span><br><span class="line">646</span><br><span class="line">647</span><br><span class="line">648</span><br><span class="line">649</span><br><span class="line">650</span><br><span class="line">651</span><br><span class="line">652</span><br><span class="line">653</span><br><span class="line">654</span><br><span class="line">655</span><br><span class="line">656</span><br><span class="line">657</span><br><span class="line">658</span><br><span class="line">659</span><br><span class="line">660</span><br><span class="line">661</span><br><span class="line">662</span><br><span class="line">663</span><br><span class="line">664</span><br><span class="line">665</span><br><span class="line">666</span><br><span class="line">667</span><br><span class="line">668</span><br><span class="line">669</span><br><span class="line">670</span><br><span class="line">671</span><br><span class="line">672</span><br><span class="line">673</span><br><span class="line">674</span><br><span class="line">675</span><br><span class="line">676</span><br><span class="line">677</span><br><span class="line">678</span><br><span class="line">679</span><br><span class="line">680</span><br><span class="line">681</span><br><span class="line">682</span><br><span class="line">683</span><br><span class="line">684</span><br><span class="line">685</span><br><span class="line">686</span><br><span class="line">687</span><br><span class="line">688</span><br><span class="line">689</span><br><span class="line">690</span><br><span class="line">691</span><br><span class="line">692</span><br><span class="line">693</span><br><span class="line">694</span><br><span class="line">695</span><br><span class="line">696</span><br><span class="line">697</span><br><span class="line">698</span><br><span class="line">699</span><br><span class="line">700</span><br><span class="line">701</span><br><span class="line">702</span><br><span class="line">703</span><br><span class="line">704</span><br><span class="line">705</span><br><span class="line">706</span><br><span class="line">707</span><br><span class="line">708</span><br><span class="line">709</span><br><span class="line">710</span><br><span class="line">711</span><br><span class="line">712</span><br><span class="line">713</span><br><span class="line">714</span><br><span class="line">715</span><br><span class="line">716</span><br><span class="line">717</span><br><span class="line">718</span><br><span class="line">719</span><br><span class="line">720</span><br><span class="line">721</span><br><span class="line">722</span><br><span class="line">723</span><br><span class="line">724</span><br><span class="line">725</span><br><span class="line">726</span><br><span class="line">727</span><br><span class="line">728</span><br><span class="line">729</span><br><span class="line">730</span><br><span class="line">731</span><br><span class="line">732</span><br><span class="line">733</span><br><span class="line">734</span><br><span class="line">735</span><br><span class="line">736</span><br><span class="line">737</span><br><span class="line">738</span><br><span class="line">739</span><br><span class="line">740</span><br><span class="line">741</span><br><span class="line">742</span><br><span class="line">743</span><br><span class="line">744</span><br><span class="line">745</span><br><span class="line">746</span><br><span class="line">747</span><br><span class="line">748</span><br><span class="line">749</span><br><span class="line">750</span><br><span class="line">751</span><br><span class="line">752</span><br><span class="line">753</span><br><span class="line">754</span><br><span class="line">755</span><br><span class="line">756</span><br><span class="line">757</span><br><span class="line">758</span><br><span class="line">759</span><br><span class="line">760</span><br><span class="line">761</span><br><span class="line">762</span><br><span class="line">763</span><br><span class="line">764</span><br><span class="line">765</span><br><span class="line">766</span><br><span class="line">767</span><br><span class="line">768</span><br><span class="line">769</span><br><span class="line">770</span><br><span class="line">771</span><br><span class="line">772</span><br><span class="line">773</span><br><span class="line">774</span><br><span class="line">775</span><br><span class="line">776</span><br><span class="line">777</span><br><span class="line">778</span><br><span class="line">779</span><br><span class="line">780</span><br><span class="line">781</span><br><span class="line">782</span><br><span class="line">783</span><br><span class="line">784</span><br><span class="line">785</span><br><span class="line">786</span><br><span class="line">787</span><br><span class="line">788</span><br><span class="line">789</span><br><span class="line">790</span><br><span class="line">791</span><br><span class="line">792</span><br><span class="line">793</span><br><span class="line">794</span><br><span class="line">795</span><br><span class="line">796</span><br><span class="line">797</span><br><span class="line">798</span><br><span class="line">799</span><br><span class="line">800</span><br><span class="line">801</span><br><span class="line">802</span><br><span class="line">803</span><br><span class="line">804</span><br><span class="line">805</span><br><span class="line">806</span><br><span class="line">807</span><br><span class="line">808</span><br><span class="line">809</span><br><span class="line">810</span><br><span class="line">811</span><br><span class="line">812</span><br><span class="line">813</span><br><span class="line">814</span><br><span class="line">815</span><br><span class="line">816</span><br><span class="line">817</span><br><span class="line">818</span><br><span class="line">819</span><br><span class="line">820</span><br><span class="line">821</span><br><span class="line">822</span><br><span class="line">823</span><br><span class="line">824</span><br><span class="line">825</span><br><span class="line">826</span><br><span class="line">827</span><br><span class="line">828</span><br><span class="line">829</span><br><span class="line">830</span><br><span class="line">831</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line"><span class="comment">// ==UserScript==</span></span><br><span class="line"><span class="comment">// @name         Studylink Userscript</span></span><br><span class="line"><span class="comment">// @namespace    http://tampermonkey.net/</span></span><br><span class="line"><span class="comment">// @version      0.1</span></span><br><span class="line"><span class="comment">// @description  try to take over the world!</span></span><br><span class="line"><span class="comment">// @author       You</span></span><br><span class="line"><span class="comment">// @match        https://customer.studylink.com/*</span></span><br><span class="line"><span class="comment">// @require     http://ss.aemg.com.au/theme/Officer/js/chosen.jquery.js</span></span><br><span class="line"><span class="comment">// @grant       GM_xmlhttpRequest</span></span><br><span class="line"><span class="comment">// @grant       GM_addStyle</span></span><br><span class="line"><span class="comment">// @grant       GM_getResourceText</span></span><br><span class="line"><span class="comment">// @run-at      document-end</span></span><br><span class="line"><span class="comment">// ==/UserScript==</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">//var jqChosen_CssSrc = GM_getResourceText ("jqChosen_CSS");</span></span><br><span class="line">GM_addStyle (<span class="string">'#myFixedDiv &#123;position:fixed;height:auto;width:250px;background-color: khaki;bottom:0;right:0;padding:10px;transition: transform 2s;&#125;.tips-trans &#123;transform: translate(80%);&#125;.chosen-container&#123;position:relative;display:inline-block;vertical-align:middle;font-size:13px;zoom:1;*display:inline;-webkit-user-select:none;-moz-user-select:none;user-select:none&#125;.chosen-container .chosen-drop&#123;position:absolute;top:100%;left:-9999px;z-index:1010;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%;border:1px solid #aaa;border-top:0;background:#fff;box-shadow:0 4px 5px rgba(0,0,0,.15)&#125;.chosen-container.chosen-with-drop .chosen-drop&#123;left:0&#125;.chosen-container a&#123;cursor:pointer&#125;.chosen-container-single .chosen-single&#123;position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:23px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),color-stop(100%,#f4f4f4));background:-webkit-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-moz-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-o-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px&#125;.chosen-container-single .chosen-default&#123;color:#999&#125;.chosen-container-single .chosen-single span&#123;display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap&#125;.chosen-container-single .chosen-single-with-deselect span&#123;margin-right:38px&#125;.chosen-container-single .chosen-single abbr&#123;position:absolute;top:6px;right:26px;display:block;width:12px;height:12px;background:url(http://ss.aemg.com.au/theme/Officer/css/chosen-sprite.png) -42px 1px no-repeat;font-size:1px&#125;.chosen-container-single .chosen-single abbr:hover&#123;background-position:-42px -10px&#125;.chosen-container-single.chosen-disabled .chosen-single abbr:hover&#123;background-position:-42px -10px&#125;.chosen-container-single .chosen-single div&#123;position:absolute;top:0;right:0;display:block;width:18px;height:100%&#125;.chosen-container-single .chosen-single div b&#123;display:block;width:100%;height:100%;background:url(http://ss.aemg.com.au/theme/Officer/css/chosen-sprite.png) no-repeat 0 2px&#125;.chosen-container-single .chosen-search&#123;position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap&#125;.chosen-container-single .chosen-search input[type=text]&#123;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;background:#fff url(http://ss.aemg.com.au/theme/Officer/css/chosen-sprite.png) no-repeat 100% -20px;background:url(http://ss.aemg.com.au/theme/Officer/css/chosen-sprite.png) no-repeat 100% -20px;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0&#125;.chosen-container-single .chosen-drop&#123;margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box&#125;.chosen-container-single.chosen-container-single-nosearch .chosen-search&#123;position:absolute;left:-9999px&#125;.chosen-container .chosen-results&#123;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch&#125;.chosen-container .chosen-results li&#123;display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;-webkit-touch-callout:none&#125;.chosen-container .chosen-results li.active-result&#123;display:list-item;cursor:pointer&#125;.chosen-container .chosen-results li.disabled-result&#123;display:list-item;color:#ccc;cursor:default&#125;.chosen-container .chosen-results li.highlighted&#123;background-color:#3875d7;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#3875d7),color-stop(90%,#2a62bc));background-image:-webkit-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-moz-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-o-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:linear-gradient(#3875d7 20%,#2a62bc 90%);color:#fff&#125;.chosen-container .chosen-results li.no-results&#123;display:list-item;background:#f4f4f4&#125;.chosen-container .chosen-results li.group-result&#123;display:list-item;font-weight:700;cursor:default&#125;.chosen-container .chosen-results li.group-option&#123;padding-left:15px&#125;.chosen-container .chosen-results li em&#123;font-style:normal;text-decoration:underline&#125;.chosen-container-multi .chosen-choices&#123;position:relative;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;width:100%;height:auto!important;height:1%;border:1px solid #aaa;background-color:#fff;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(1%,#eee),color-stop(15%,#fff));background-image:-webkit-linear-gradient(#eee 1%,#fff 15%);background-image:-moz-linear-gradient(#eee 1%,#fff 15%);background-image:-o-linear-gradient(#eee 1%,#fff 15%);background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text&#125;.chosen-container-multi .chosen-choices li&#123;float:left;list-style:none&#125;.chosen-container-multi .chosen-choices li.search-field&#123;margin:0;padding:0;white-space:nowrap&#125;.chosen-container-multi .chosen-choices li.search-field input[type=text]&#123;margin:1px 0;padding:5px;height:15px;outline:0;border:0!important;background:transparent!important;box-shadow:none;color:#666;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0&#125;.chosen-container-multi .chosen-choices li.search-field .default&#123;color:#999&#125;.chosen-container-multi .chosen-choices li.search-choice&#123;position:relative;margin:3px 0 3px 5px;padding:3px 20px 3px 5px;border:1px solid #aaa;border-radius:3px;background-color:#e4e4e4;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-clip:padding-box;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default&#125;.chosen-container-multi .chosen-choices li.search-choice .search-choice-close&#123;position:absolute;top:4px;right:3px;display:block;width:12px;height:12px;background:url(http://ss.aemg.com.au/theme/Officer/css/chosen-sprite.png) -42px 1px no-repeat;font-size:1px&#125;.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover&#123;background-position:-42px -10px&#125;.chosen-container-multi .chosen-choices li.search-choice-disabled&#123;padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);color:#666&#125;.chosen-container-multi .chosen-choices li.search-choice-focus&#123;background:#d4d4d4&#125;.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close&#123;background-position:-42px -10px&#125;.chosen-container-multi .chosen-results&#123;margin:0;padding:0&#125;.chosen-container-multi .chosen-drop .result-selected&#123;display:list-item;color:#ccc;cursor:default&#125;.chosen-container-active .chosen-single&#123;border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)&#125;.chosen-container-active.chosen-with-drop .chosen-single&#123;border:1px solid #aaa;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#eee),color-stop(80%,#fff));background-image:-webkit-linear-gradient(#eee 20%,#fff 80%);background-image:-moz-linear-gradient(#eee 20%,#fff 80%);background-image:-o-linear-gradient(#eee 20%,#fff 80%);background-image:linear-gradient(#eee 20%,#fff 80%);box-shadow:0 1px 0 #fff inset&#125;.chosen-container-active.chosen-with-drop .chosen-single div&#123;border-left:0;background:transparent&#125;.chosen-container-active.chosen-with-drop .chosen-single div b&#123;background-position:-18px 2px&#125;.chosen-container-active .chosen-choices&#123;border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)&#125;.chosen-container-active .chosen-choices li.search-field input[type=text]&#123;color:#111!important&#125;.chosen-disabled&#123;opacity:.5!important;cursor:default&#125;.chosen-disabled .chosen-single&#123;cursor:default&#125;.chosen-disabled .chosen-choices .search-choice .search-choice-close&#123;cursor:default&#125;.chosen-rtl&#123;text-align:right&#125;.chosen-rtl .chosen-single&#123;overflow:visible;padding:0 8px 0 0&#125;.chosen-rtl .chosen-single span&#123;margin-right:0;margin-left:26px;direction:rtl&#125;.chosen-rtl .chosen-single-with-deselect span&#123;margin-left:38px&#125;.chosen-rtl .chosen-single div&#123;right:auto;left:3px&#125;.chosen-rtl .chosen-single abbr&#123;right:auto;left:26px&#125;.chosen-rtl .chosen-choices li&#123;float:right&#125;.chosen-rtl .chosen-choices li.search-field input[type=text]&#123;direction:rtl&#125;.chosen-rtl .chosen-choices li.search-choice&#123;margin:3px 5px 3px 0;padding:3px 5px 3px 19px&#125;.chosen-rtl .chosen-choices li.search-choice .search-choice-close&#123;right:auto;left:4px&#125;.chosen-rtl.chosen-container-single-nosearch .chosen-search,.chosen-rtl .chosen-drop&#123;left:9999px&#125;.chosen-rtl.chosen-container-single .chosen-results&#123;margin:0 0 4px 4px;padding:0 4px 0 0&#125;.chosen-rtl .chosen-results li.group-option&#123;padding-right:15px;padding-left:0&#125;.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div&#123;border-right:0&#125;.chosen-rtl .chosen-search input[type=text]&#123;padding:4px 5px 4px 20px;background:#fff url(http://ss.aemg.com.au/theme/Officer/css/chosen-sprite.png) no-repeat -30px -20px;background:url(http://ss.aemg.com.au/theme/Officer/css/chosen-sprite.png) no-repeat -30px -20px;direction:rtl&#125;.chosen-rtl.chosen-container-single .chosen-single div b&#123;background-position:6px 2px&#125;.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b&#123;background-position:-12px 2px&#125;@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-resolution:144dpi)&#123;.chosen-rtl .chosen-search input[type=text],.chosen-container-single .chosen-single abbr,.chosen-container-single .chosen-single div b,.chosen-container-single .chosen-search input[type=text],.chosen-container-multi .chosen-choices .search-choice .search-choice-close,.chosen-container .chosen-results-scroll-down span,.chosen-container .chosen-results-scroll-up span&#123;background-image:url(chosen-sprite@2x.png)!important;background-size:52px 37px!important;background-repeat:no-repeat!important&#125;&#125;'</span>);</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> hex_chr = <span class="string">"0123456789abcdef"</span>;</span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">rhex</span>(<span class="params">num</span>)</span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line">  str = <span class="string">""</span>;</span><br><span class="line">  <span class="keyword">for</span>(j = <span class="number">0</span>; j &lt;= <span class="number">3</span>; j++)</span><br><span class="line">    str += hex_chr.charAt((num &gt;&gt; (j * <span class="number">8</span> + <span class="number">4</span>)) &amp; <span class="number">0x0F</span>) +</span><br><span class="line">           hex_chr.charAt((num &gt;&gt; (j * <span class="number">8</span>)) &amp; <span class="number">0x0F</span>);</span><br><span class="line">  <span class="keyword">return</span> str;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * Convert a string to a sequence of 16-word blocks, stored as an array.</span></span><br><span class="line"><span class="comment"> * Append padding bits and the length, as described in the MD5 standard.</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">str2blks_MD5</span>(<span class="params">str</span>)</span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line">  nblk = ((str.length + <span class="number">8</span>) &gt;&gt; <span class="number">6</span>) + <span class="number">1</span>;</span><br><span class="line">  blks = <span class="keyword">new</span> <span class="built_in">Array</span>(nblk * <span class="number">16</span>);</span><br><span class="line">  <span class="keyword">for</span>(i = <span class="number">0</span>; i &lt; nblk * <span class="number">16</span>; i++) blks[i] = <span class="number">0</span>;</span><br><span class="line">  <span class="keyword">for</span>(i = <span class="number">0</span>; i &lt; str.length; i++)</span><br><span class="line">    blks[i &gt;&gt; <span class="number">2</span>] |= str.charCodeAt(i) &lt;&lt; ((i % <span class="number">4</span>) * <span class="number">8</span>);</span><br><span class="line">  blks[i &gt;&gt; <span class="number">2</span>] |= <span class="number">0x80</span> &lt;&lt; ((i % <span class="number">4</span>) * <span class="number">8</span>);</span><br><span class="line">  blks[nblk * <span class="number">16</span> - <span class="number">2</span>] = str.length * <span class="number">8</span>;</span><br><span class="line">  <span class="keyword">return</span> blks;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * Add integers, wrapping at 2^32. This uses 16-bit operations internally</span></span><br><span class="line"><span class="comment"> * to work around bugs in some JS interpreters.</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">add</span>(<span class="params">x, y</span>)</span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line">  <span class="keyword">var</span> lsw = (x &amp; <span class="number">0xFFFF</span>) + (y &amp; <span class="number">0xFFFF</span>);</span><br><span class="line">  <span class="keyword">var</span> msw = (x &gt;&gt; <span class="number">16</span>) + (y &gt;&gt; <span class="number">16</span>) + (lsw &gt;&gt; <span class="number">16</span>);</span><br><span class="line">  <span class="keyword">return</span> (msw &lt;&lt; <span class="number">16</span>) | (lsw &amp; <span class="number">0xFFFF</span>);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * Bitwise rotate a 32-bit number to the left</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">rol</span>(<span class="params">num, cnt</span>)</span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line">  <span class="keyword">return</span> (num &lt;&lt; cnt) | (num &gt;&gt;&gt; (<span class="number">32</span> - cnt));</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * These functions implement the basic operation for each round of the</span></span><br><span class="line"><span class="comment"> * algorithm.</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">cmn</span>(<span class="params">q, a, b, x, s, t</span>)</span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line">  <span class="keyword">return</span> add(rol(add(add(a, q), add(x, t)), s), b);</span><br><span class="line">&#125;</span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">ff</span>(<span class="params">a, b, c, d, x, s, t</span>)</span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line">  <span class="keyword">return</span> cmn((b &amp; c) | ((~b) &amp; d), a, b, x, s, t);</span><br><span class="line">&#125;</span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">gg</span>(<span class="params">a, b, c, d, x, s, t</span>)</span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line">  <span class="keyword">return</span> cmn((b &amp; d) | (c &amp; (~d)), a, b, x, s, t);</span><br><span class="line">&#125;</span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">hh</span>(<span class="params">a, b, c, d, x, s, t</span>)</span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line">  <span class="keyword">return</span> cmn(b ^ c ^ d, a, b, x, s, t);</span><br><span class="line">&#125;</span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">ii</span>(<span class="params">a, b, c, d, x, s, t</span>)</span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line">  <span class="keyword">return</span> cmn(c ^ (b | (~d)), a, b, x, s, t);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * Take a string and return the hex representation of its MD5.</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">calcMD5</span>(<span class="params">str</span>)</span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line">  x = str2blks_MD5(str);</span><br><span class="line">  a =  <span class="number">1732584193</span>;</span><br><span class="line">  b = <span class="number">-271733879</span>;</span><br><span class="line">  c = <span class="number">-1732584194</span>;</span><br><span class="line">  d =  <span class="number">271733878</span>;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">for</span>(i = <span class="number">0</span>; i &lt; x.length; i += <span class="number">16</span>)</span><br><span class="line">  &#123;</span><br><span class="line">    olda = a;</span><br><span class="line">    oldb = b;</span><br><span class="line">    oldc = c;</span><br><span class="line">    oldd = d;</span><br><span class="line"></span><br><span class="line">    a = ff(a, b, c, d, x[i+ <span class="number">0</span>], <span class="number">7</span> , <span class="number">-680876936</span>);</span><br><span class="line">    d = ff(d, a, b, c, x[i+ <span class="number">1</span>], <span class="number">12</span>, <span class="number">-389564586</span>);</span><br><span class="line">    c = ff(c, d, a, b, x[i+ <span class="number">2</span>], <span class="number">17</span>,  <span class="number">606105819</span>);</span><br><span class="line">    b = ff(b, c, d, a, x[i+ <span class="number">3</span>], <span class="number">22</span>, <span class="number">-1044525330</span>);</span><br><span class="line">    a = ff(a, b, c, d, x[i+ <span class="number">4</span>], <span class="number">7</span> , <span class="number">-176418897</span>);</span><br><span class="line">    d = ff(d, a, b, c, x[i+ <span class="number">5</span>], <span class="number">12</span>,  <span class="number">1200080426</span>);</span><br><span class="line">    c = ff(c, d, a, b, x[i+ <span class="number">6</span>], <span class="number">17</span>, <span class="number">-1473231341</span>);</span><br><span class="line">    b = ff(b, c, d, a, x[i+ <span class="number">7</span>], <span class="number">22</span>, <span class="number">-45705983</span>);</span><br><span class="line">    a = ff(a, b, c, d, x[i+ <span class="number">8</span>], <span class="number">7</span> ,  <span class="number">1770035416</span>);</span><br><span class="line">    d = ff(d, a, b, c, x[i+ <span class="number">9</span>], <span class="number">12</span>, <span class="number">-1958414417</span>);</span><br><span class="line">    c = ff(c, d, a, b, x[i+<span class="number">10</span>], <span class="number">17</span>, <span class="number">-42063</span>);</span><br><span class="line">    b = ff(b, c, d, a, x[i+<span class="number">11</span>], <span class="number">22</span>, <span class="number">-1990404162</span>);</span><br><span class="line">    a = ff(a, b, c, d, x[i+<span class="number">12</span>], <span class="number">7</span> ,  <span class="number">1804603682</span>);</span><br><span class="line">    d = ff(d, a, b, c, x[i+<span class="number">13</span>], <span class="number">12</span>, <span class="number">-40341101</span>);</span><br><span class="line">    c = ff(c, d, a, b, x[i+<span class="number">14</span>], <span class="number">17</span>, <span class="number">-1502002290</span>);</span><br><span class="line">    b = ff(b, c, d, a, x[i+<span class="number">15</span>], <span class="number">22</span>,  <span class="number">1236535329</span>);</span><br><span class="line"></span><br><span class="line">    a = gg(a, b, c, d, x[i+ <span class="number">1</span>], <span class="number">5</span> , <span class="number">-165796510</span>);</span><br><span class="line">    d = gg(d, a, b, c, x[i+ <span class="number">6</span>], <span class="number">9</span> , <span class="number">-1069501632</span>);</span><br><span class="line">    c = gg(c, d, a, b, x[i+<span class="number">11</span>], <span class="number">14</span>,  <span class="number">643717713</span>);</span><br><span class="line">    b = gg(b, c, d, a, x[i+ <span class="number">0</span>], <span class="number">20</span>, <span class="number">-373897302</span>);</span><br><span class="line">    a = gg(a, b, c, d, x[i+ <span class="number">5</span>], <span class="number">5</span> , <span class="number">-701558691</span>);</span><br><span class="line">    d = gg(d, a, b, c, x[i+<span class="number">10</span>], <span class="number">9</span> ,  <span class="number">38016083</span>);</span><br><span class="line">    c = gg(c, d, a, b, x[i+<span class="number">15</span>], <span class="number">14</span>, <span class="number">-660478335</span>);</span><br><span class="line">    b = gg(b, c, d, a, x[i+ <span class="number">4</span>], <span class="number">20</span>, <span class="number">-405537848</span>);</span><br><span class="line">    a = gg(a, b, c, d, x[i+ <span class="number">9</span>], <span class="number">5</span> ,  <span class="number">568446438</span>);</span><br><span class="line">    d = gg(d, a, b, c, x[i+<span class="number">14</span>], <span class="number">9</span> , <span class="number">-1019803690</span>);</span><br><span class="line">    c = gg(c, d, a, b, x[i+ <span class="number">3</span>], <span class="number">14</span>, <span class="number">-187363961</span>);</span><br><span class="line">    b = gg(b, c, d, a, x[i+ <span class="number">8</span>], <span class="number">20</span>,  <span class="number">1163531501</span>);</span><br><span class="line">    a = gg(a, b, c, d, x[i+<span class="number">13</span>], <span class="number">5</span> , <span class="number">-1444681467</span>);</span><br><span class="line">    d = gg(d, a, b, c, x[i+ <span class="number">2</span>], <span class="number">9</span> , <span class="number">-51403784</span>);</span><br><span class="line">    c = gg(c, d, a, b, x[i+ <span class="number">7</span>], <span class="number">14</span>,  <span class="number">1735328473</span>);</span><br><span class="line">    b = gg(b, c, d, a, x[i+<span class="number">12</span>], <span class="number">20</span>, <span class="number">-1926607734</span>);</span><br><span class="line"></span><br><span class="line">    a = hh(a, b, c, d, x[i+ <span class="number">5</span>], <span class="number">4</span> , <span class="number">-378558</span>);</span><br><span class="line">    d = hh(d, a, b, c, x[i+ <span class="number">8</span>], <span class="number">11</span>, <span class="number">-2022574463</span>);</span><br><span class="line">    c = hh(c, d, a, b, x[i+<span class="number">11</span>], <span class="number">16</span>,  <span class="number">1839030562</span>);</span><br><span class="line">    b = hh(b, c, d, a, x[i+<span class="number">14</span>], <span class="number">23</span>, <span class="number">-35309556</span>);</span><br><span class="line">    a = hh(a, b, c, d, x[i+ <span class="number">1</span>], <span class="number">4</span> , <span class="number">-1530992060</span>);</span><br><span class="line">    d = hh(d, a, b, c, x[i+ <span class="number">4</span>], <span class="number">11</span>,  <span class="number">1272893353</span>);</span><br><span class="line">    c = hh(c, d, a, b, x[i+ <span class="number">7</span>], <span class="number">16</span>, <span class="number">-155497632</span>);</span><br><span class="line">    b = hh(b, c, d, a, x[i+<span class="number">10</span>], <span class="number">23</span>, <span class="number">-1094730640</span>);</span><br><span class="line">    a = hh(a, b, c, d, x[i+<span class="number">13</span>], <span class="number">4</span> ,  <span class="number">681279174</span>);</span><br><span class="line">    d = hh(d, a, b, c, x[i+ <span class="number">0</span>], <span class="number">11</span>, <span class="number">-358537222</span>);</span><br><span class="line">    c = hh(c, d, a, b, x[i+ <span class="number">3</span>], <span class="number">16</span>, <span class="number">-722521979</span>);</span><br><span class="line">    b = hh(b, c, d, a, x[i+ <span class="number">6</span>], <span class="number">23</span>,  <span class="number">76029189</span>);</span><br><span class="line">    a = hh(a, b, c, d, x[i+ <span class="number">9</span>], <span class="number">4</span> , <span class="number">-640364487</span>);</span><br><span class="line">    d = hh(d, a, b, c, x[i+<span class="number">12</span>], <span class="number">11</span>, <span class="number">-421815835</span>);</span><br><span class="line">    c = hh(c, d, a, b, x[i+<span class="number">15</span>], <span class="number">16</span>,  <span class="number">530742520</span>);</span><br><span class="line">    b = hh(b, c, d, a, x[i+ <span class="number">2</span>], <span class="number">23</span>, <span class="number">-995338651</span>);</span><br><span class="line"></span><br><span class="line">    a = ii(a, b, c, d, x[i+ <span class="number">0</span>], <span class="number">6</span> , <span class="number">-198630844</span>);</span><br><span class="line">    d = ii(d, a, b, c, x[i+ <span class="number">7</span>], <span class="number">10</span>,  <span class="number">1126891415</span>);</span><br><span class="line">    c = ii(c, d, a, b, x[i+<span class="number">14</span>], <span class="number">15</span>, <span class="number">-1416354905</span>);</span><br><span class="line">    b = ii(b, c, d, a, x[i+ <span class="number">5</span>], <span class="number">21</span>, <span class="number">-57434055</span>);</span><br><span class="line">    a = ii(a, b, c, d, x[i+<span class="number">12</span>], <span class="number">6</span> ,  <span class="number">1700485571</span>);</span><br><span class="line">    d = ii(d, a, b, c, x[i+ <span class="number">3</span>], <span class="number">10</span>, <span class="number">-1894986606</span>);</span><br><span class="line">    c = ii(c, d, a, b, x[i+<span class="number">10</span>], <span class="number">15</span>, <span class="number">-1051523</span>);</span><br><span class="line">    b = ii(b, c, d, a, x[i+ <span class="number">1</span>], <span class="number">21</span>, <span class="number">-2054922799</span>);</span><br><span class="line">    a = ii(a, b, c, d, x[i+ <span class="number">8</span>], <span class="number">6</span> ,  <span class="number">1873313359</span>);</span><br><span class="line">    d = ii(d, a, b, c, x[i+<span class="number">15</span>], <span class="number">10</span>, <span class="number">-30611744</span>);</span><br><span class="line">    c = ii(c, d, a, b, x[i+ <span class="number">6</span>], <span class="number">15</span>, <span class="number">-1560198380</span>);</span><br><span class="line">    b = ii(b, c, d, a, x[i+<span class="number">13</span>], <span class="number">21</span>,  <span class="number">1309151649</span>);</span><br><span class="line">    a = ii(a, b, c, d, x[i+ <span class="number">4</span>], <span class="number">6</span> , <span class="number">-145523070</span>);</span><br><span class="line">    d = ii(d, a, b, c, x[i+<span class="number">11</span>], <span class="number">10</span>, <span class="number">-1120210379</span>);</span><br><span class="line">    c = ii(c, d, a, b, x[i+ <span class="number">2</span>], <span class="number">15</span>,  <span class="number">718787259</span>);</span><br><span class="line">    b = ii(b, c, d, a, x[i+ <span class="number">9</span>], <span class="number">21</span>, <span class="number">-343485551</span>);</span><br><span class="line"></span><br><span class="line">    a = add(a, olda);</span><br><span class="line">    b = add(b, oldb);</span><br><span class="line">    c = add(c, oldc);</span><br><span class="line">    d = add(d, oldd);</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="keyword">return</span> rhex(a) + rhex(b) + rhex(c) + rhex(d);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">strencode</span>(<span class="params">string</span>) </span>&#123;</span><br><span class="line">    <span class="keyword">var</span> key = calcMD5(<span class="string">'aemgmelbourne'</span>);</span><br><span class="line">    <span class="keyword">var</span> str = atob(string);</span><br><span class="line">    <span class="keyword">var</span> len = key.length;</span><br><span class="line">    <span class="keyword">var</span> code = <span class="string">''</span>;</span><br><span class="line">    <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; str.length; i++) &#123;</span><br><span class="line">        <span class="keyword">var</span> k = i % len;</span><br><span class="line">        code += <span class="built_in">String</span>.fromCharCode(str.charCodeAt(i) ^ key.charCodeAt(k));</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">return</span> atob(code);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">addTips</span>(<span class="params"></span>)</span>&#123;</span><br><span class="line">    $(<span class="string">"body"</span>).after(<span class="string">"&lt;div id='myFixedDiv'&gt;\</span></span><br><span class="line"><span class="string">                &lt;div id='myTips' style='text-align: center; font-weight:bold'&gt;Script Tips&lt;/div&gt;\</span></span><br><span class="line"><span class="string">            &lt;/div&gt;"</span>);</span><br><span class="line">    $(<span class="string">"#myFixedDiv"</span>).bind(<span class="string">"click"</span>, <span class="function"><span class="keyword">function</span>(<span class="params"></span>)</span>&#123;</span><br><span class="line">      $(<span class="keyword">this</span>).toggleClass(<span class="string">"tips-trans"</span>);</span><br><span class="line">    &#125;)</span><br><span class="line">&#125;</span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">fillInTips</span>(<span class="params">myInfo</span>)</span>&#123;</span><br><span class="line">     <span class="comment">//提示信息</span></span><br><span class="line">    <span class="keyword">if</span>(myInfo)&#123;</span><br><span class="line">        <span class="built_in">console</span>.log(<span class="string">"print tips"</span>);</span><br><span class="line">        $(<span class="string">"#myFixedDiv"</span>).append(<span class="string">"&lt;div id='myAddedDiv0' style='border-bottom: 1px solid pink'&gt;&lt;/div&gt;"</span>);</span><br><span class="line">        $(<span class="string">"#myFixedDiv"</span>).append(<span class="string">"&lt;div id='myAddedDiv1' /&gt;"</span>);</span><br><span class="line">        $(<span class="string">"#myFixedDiv"</span>).append(<span class="string">"&lt;div id='myAddedDiv2' style='border-bottom: 1px solid pink'&gt;&lt;/div&gt;"</span>);</span><br><span class="line">        $(<span class="string">"#myFixedDiv"</span>).append(<span class="string">"&lt;div id='myAddedDiv3' /&gt;"</span>);</span><br><span class="line">        $(<span class="string">"#myFixedDiv"</span>).append(<span class="string">"&lt;div id='myAddedDiv4' /&gt;"</span>);</span><br><span class="line">        $(<span class="string">"#myAddedDiv0"</span>).html(<span class="string">'&lt;b&gt;'</span>+myInfo.PersonalDetails.first_name + <span class="string">" "</span> + myInfo.PersonalDetails.last_name + <span class="string">"&lt;/b&gt; apply for "</span> + myInfo.CourseApplicationMain.university);</span><br><span class="line">        $(<span class="string">"#myAddedDiv1"</span>).html(<span class="string">"&lt;b&gt;course: &lt;/b&gt;"</span> + myInfo.CourseApplicationLanguage.course_name);</span><br><span class="line">        $(<span class="string">"#myAddedDiv2"</span>).html(<span class="string">"&lt;b&gt;start date: &lt;/b&gt;"</span> + myInfo.CourseApplicationLanguage.start_date);</span><br><span class="line">        $(<span class="string">"#myAddedDiv3"</span>).html(<span class="string">"&lt;b&gt;course: &lt;/b&gt;"</span> + myInfo.CourseApplicationMain.course_name);</span><br><span class="line">        $(<span class="string">"#myAddedDiv4"</span>).html(<span class="string">"&lt;b&gt;start date: &lt;/b&gt;"</span> + myInfo.CourseApplicationMain.start_date);</span><br><span class="line">    &#125; <span class="keyword">else</span>&#123;</span><br><span class="line">       <span class="built_in">console</span>.log(<span class="string">"will not print tips"</span>);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line">(<span class="function"><span class="keyword">function</span>(<span class="params">$</span>) </span>&#123;</span><br><span class="line">    $(<span class="function"><span class="keyword">function</span>(<span class="params"></span>)</span>&#123;</span><br><span class="line">        <span class="function"><span class="keyword">function</span> <span class="title">getURLParameter</span>(<span class="params">name</span>) </span>&#123;</span><br><span class="line">            <span class="keyword">return</span> (<span class="built_in">RegExp</span>(name + <span class="string">'='</span> + <span class="string">'(.+?)(&amp;|$)'</span>).exec(location.search)||[,<span class="literal">null</span>])[<span class="number">1</span>];</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="function"><span class="keyword">function</span> <span class="title">getCharMonth</span>(<span class="params">i</span>)</span>&#123;</span><br><span class="line">            <span class="keyword">var</span> monthNames = [<span class="string">"January"</span>, <span class="string">"February"</span>, <span class="string">"March"</span>, <span class="string">"April"</span>, <span class="string">"May"</span>, <span class="string">"June"</span>,</span><br><span class="line">              <span class="string">"July"</span>, <span class="string">"August"</span>, <span class="string">"September"</span>, <span class="string">"October"</span>, <span class="string">"November"</span>, <span class="string">"December"</span></span><br><span class="line">            ];</span><br><span class="line">            <span class="keyword">return</span> monthNames[i];</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="function"><span class="keyword">function</span> <span class="title">queryApplication</span>(<span class="params">opt</span>)</span>&#123;</span><br><span class="line">            <span class="comment">//var url = 'http://10.0.0.40/ss/Students/course_application_list';</span></span><br><span class="line">            <span class="keyword">var</span> url = <span class="string">'http://cloudservice.au-edu.com/service_staging/Students/course_application_list'</span>;</span><br><span class="line">            GM_xmlhttpRequest(&#123;</span><br><span class="line">                <span class="string">"method"</span>: <span class="string">'GET'</span>,</span><br><span class="line">                <span class="string">"url"</span>: url,</span><br><span class="line">                <span class="string">"headers"</span>: &#123;<span class="string">"Content-Type"</span>: <span class="string">"application/x-www-form-urlencoded"</span>&#125;,</span><br><span class="line">                <span class="string">"onload"</span>: <span class="function"><span class="keyword">function</span>(<span class="params">response</span>) </span>&#123;</span><br><span class="line"><span class="comment">//                    console.log("response:", response);</span></span><br><span class="line">                    <span class="keyword">var</span> html=response.responseText;</span><br><span class="line"><span class="comment">//                    console.log("html:", html);</span></span><br><span class="line">                    <span class="keyword">if</span>(html)&#123;</span><br><span class="line">                        <span class="keyword">var</span> ret = strencode(html);</span><br><span class="line"><span class="comment">//                        console.log("ret:", ret);</span></span><br><span class="line">                        <span class="keyword">try</span>&#123;</span><br><span class="line">                            <span class="keyword">var</span> mJson = <span class="built_in">JSON</span>.parse(ret);</span><br><span class="line">                            $(<span class="string">".chosen-select option"</span>).remove();</span><br><span class="line">                            $(<span class="string">".chosen-select"</span>).append(<span class="string">"&lt;option value=''&gt; -- select --&lt;/option&gt;"</span>);</span><br><span class="line">                            <span class="keyword">for</span>(<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; mJson.length; i++)&#123;</span><br><span class="line">                                <span class="keyword">var</span> mItem = mJson[i];</span><br><span class="line">                                <span class="keyword">var</span> mOption = $(<span class="string">"&lt;option&gt;"</span>, &#123; <span class="attr">value</span>: i, <span class="attr">text</span> : mItem.name + <span class="string">" "</span> + mItem.email + <span class="string">" "</span> + mItem.first_name + <span class="string">" "</span> + mItem.last_name + <span class="string">" "</span> + mItem.university&#125;);</span><br><span class="line">                                $(<span class="string">".chosen-select"</span>).append(mOption);</span><br><span class="line">                            &#125;</span><br><span class="line">                            $(<span class="string">".chosen-select"</span>).chosen(&#123;<span class="attr">width</span>:<span class="string">"100%"</span>&#125;);</span><br><span class="line">                            $(<span class="string">".chosen-select"</span>).change(<span class="function"><span class="keyword">function</span>(<span class="params">event</span>)</span>&#123;</span><br><span class="line">                                <span class="keyword">var</span> mId = <span class="keyword">this</span>.value;</span><br><span class="line">                                <span class="keyword">var</span> ii = mJson[mId];</span><br><span class="line">                                <span class="keyword">if</span>(ii)&#123;</span><br><span class="line">                                    <span class="keyword">var</span> dob = ii.date_of_birth.split(<span class="string">"-"</span>);</span><br><span class="line">                                    <span class="keyword">var</span> mon = <span class="built_in">parseInt</span>(dob[<span class="number">1</span>])<span class="number">-1</span>;</span><br><span class="line">                                    <span class="keyword">var</span> dobMonth = getCharMonth(mon);</span><br><span class="line">                                    $(<span class="string">"table input[name=st_email]"</span>).val(ii.email);</span><br><span class="line">                                    $(<span class="string">"table input[name=st_firstname]"</span>).val(ii.first_name);</span><br><span class="line">                                    $(<span class="string">"table input[name=st_lastname]"</span>).val(ii.last_name);</span><br><span class="line">                                    $(<span class="string">"table select[name=st_country] option:contains(CHINA)"</span>).prop(<span class="string">"selected"</span>, <span class="literal">true</span>);</span><br><span class="line">                                    $(<span class="string">"table select[name=st_dob_day]"</span>).val(<span class="built_in">parseInt</span>(dob[<span class="number">2</span>]));</span><br><span class="line">                                    $(<span class="string">"table select[name=st_dob_month]"</span>).val(dobMonth);</span><br><span class="line">                                    $(<span class="string">"table select[name=st_dob_year]"</span>).val(dob[<span class="number">0</span>]);</span><br><span class="line">                                    sessionStorage.setItem(ii.email, <span class="built_in">JSON</span>.stringify(ii));</span><br><span class="line">                                    $(<span class="string">"#simplemodal-overlay, #simplemodal-container"</span>).hide();</span><br><span class="line">                                &#125; <span class="keyword">else</span>&#123;</span><br><span class="line">                                    <span class="built_in">console</span>.log(mId, <span class="string">"not exist"</span>);</span><br><span class="line">                                &#125;</span><br><span class="line">                            &#125;);</span><br><span class="line"></span><br><span class="line">                            <span class="built_in">console</span>.log(mJson);</span><br><span class="line">                        &#125; <span class="keyword">catch</span>(e)&#123;</span><br><span class="line">                            <span class="built_in">console</span>.error(e);</span><br><span class="line">                        &#125;</span><br><span class="line">                    &#125;</span><br><span class="line">                &#125;</span><br><span class="line">            &#125;);</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="function"><span class="keyword">function</span> <span class="title">get_course_application_info</span>(<span class="params">email, cb</span>)</span>&#123;</span><br><span class="line"><span class="comment">//             var url = "http://10.0.0.40/ss/Students/get_course_application_info/" + email;</span></span><br><span class="line">             <span class="keyword">var</span> url = <span class="string">"http://cloudservice.au-edu.com/service_staging/Students/get_course_application_info/"</span> + email;</span><br><span class="line">             <span class="built_in">console</span>.log(<span class="string">"url"</span>, url);</span><br><span class="line">             GM_xmlhttpRequest(&#123;</span><br><span class="line">                <span class="string">"method"</span>: <span class="string">'GET'</span>,</span><br><span class="line">                <span class="string">"url"</span>: url,</span><br><span class="line">                <span class="string">"headers"</span>: &#123;<span class="string">"Content-Type"</span>: <span class="string">"application/x-www-form-urlencoded"</span>&#125;,</span><br><span class="line">                <span class="string">"onload"</span>: <span class="function"><span class="keyword">function</span>(<span class="params">response</span>) </span>&#123;</span><br><span class="line">                    <span class="keyword">var</span> html=response.responseText;</span><br><span class="line">                    <span class="keyword">if</span>(html)&#123;</span><br><span class="line">                        <span class="keyword">var</span> ret = strencode(html);</span><br><span class="line">                        <span class="keyword">try</span>&#123;</span><br><span class="line">                            <span class="keyword">var</span> myInfo = <span class="built_in">JSON</span>.parse(ret);</span><br><span class="line">                            <span class="built_in">console</span>.log(myInfo);</span><br><span class="line">                            cb(myInfo);</span><br><span class="line">                        &#125; <span class="keyword">catch</span>(e)&#123;</span><br><span class="line">                            <span class="built_in">console</span>.error(e);</span><br><span class="line">                        &#125;</span><br><span class="line">                    &#125;</span><br><span class="line">                &#125;,</span><br><span class="line">                onerror: <span class="function"><span class="keyword">function</span>(<span class="params">response</span>) </span>&#123;</span><br><span class="line">                    <span class="built_in">console</span>.error(<span class="string">"onerror"</span>, response);</span><br><span class="line">                    $(<span class="string">"#myTips"</span>).html(<span class="string">"Load data failed"</span>);</span><br><span class="line">                &#125;,</span><br><span class="line">                ontimeout: <span class="function"><span class="keyword">function</span>(<span class="params">response</span>) </span>&#123;</span><br><span class="line">                    <span class="built_in">console</span>.error(<span class="string">"ontimeout"</span>, response);</span><br><span class="line">                    $(<span class="string">"#myTips"</span>).html(<span class="string">"Load data timeout"</span>);</span><br><span class="line">                &#125;</span><br><span class="line">            &#125;);</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="function"><span class="keyword">function</span> <span class="title">checkRadio</span>(<span class="params">id, value, click</span>)</span>&#123;</span><br><span class="line">            value = value || <span class="string">"Yes"</span>;</span><br><span class="line">            click = click || <span class="literal">true</span>;</span><br><span class="line">            <span class="keyword">if</span>(click)&#123;</span><br><span class="line">                $(<span class="string">"#"</span>+id+<span class="string">"[value='"</span>+value+<span class="string">"']"</span>).prop(<span class="string">"checked"</span>, <span class="literal">true</span>).trigger(<span class="string">"click"</span>);</span><br><span class="line">            &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">                $(<span class="string">"#"</span>+id+<span class="string">"[value='"</span>+value+<span class="string">"']"</span>).prop(<span class="string">"checked"</span>, <span class="literal">true</span>);</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="function"><span class="keyword">function</span> <span class="title">checkSelect</span>(<span class="params">id, value, change</span>)</span>&#123;</span><br><span class="line">            change = change || <span class="literal">true</span>;</span><br><span class="line">            <span class="keyword">if</span>(change)&#123;</span><br><span class="line">                $(<span class="string">"#"</span> + id + <span class="string">" option:contains("</span> + value + <span class="string">")"</span>).prop(<span class="string">"selected"</span>, <span class="literal">true</span>).trigger(<span class="string">"change"</span>);</span><br><span class="line">            &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">                $(<span class="string">"#"</span> + id + <span class="string">" option:contains("</span> + value + <span class="string">")"</span>).prop(<span class="string">"selected"</span>, <span class="literal">true</span>);</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="function"><span class="keyword">function</span> <span class="title">changeSelectTrue</span>(<span class="params">x</span>)</span>&#123;</span><br><span class="line">            x.prop(<span class="string">"selected"</span>, <span class="literal">true</span>).trigger(<span class="string">"change"</span>);</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="function"><span class="keyword">function</span> <span class="title">clickRadio</span>(<span class="params">x</span>)</span>&#123;</span><br><span class="line">            x.prop(<span class="string">"checked"</span>, <span class="literal">true</span>).trigger(<span class="string">"click"</span>);</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="keyword">var</span> href = <span class="built_in">window</span>.location.href;</span><br><span class="line">        <span class="keyword">var</span> pathname = <span class="built_in">window</span>.location.pathname;</span><br><span class="line">        <span class="keyword">var</span> search = <span class="built_in">window</span>.location.search;</span><br><span class="line">        <span class="built_in">console</span>.log(href, pathname, search);</span><br><span class="line">        </span><br><span class="line">        <span class="keyword">var</span> param1 = getURLParameter(<span class="string">"newapplication"</span>);</span><br><span class="line">        <span class="keyword">var</span> param2 = getURLParameter(<span class="string">"event"</span>);</span><br><span class="line">        <span class="keyword">var</span> attemptEvent = <span class="string">"security.attemptLogin"</span>;</span><br><span class="line">        <span class="keyword">var</span> selectEvent = <span class="string">"course.select"</span>;</span><br><span class="line">        <span class="keyword">var</span> searchEvent = <span class="string">"course.search.process"</span>;</span><br><span class="line">        </span><br><span class="line">        <span class="keyword">if</span>(param1 || param2 == attemptEvent)&#123;</span><br><span class="line">            addTips();</span><br><span class="line">            $(<span class="string">".formHead"</span>).append(<span class="string">"&lt;button id='selectStudent' type='button' style='float:right'&gt;Select student&lt;/button&gt;"</span>);</span><br><span class="line"></span><br><span class="line">            $(<span class="string">"body"</span>).append(<span class="string">'&lt;div id="simplemodal-overlay" class="simplemodal-overlay" style="opacity: 0.5; height: 100%; width: 100%; position: fixed; left: 0px; top: 0px; z-index: 1001;"&gt;&lt;/div&gt;\</span></span><br><span class="line"><span class="string">                &lt;div id="simplemodal-container" class="simplemodal-container" style="position: fixed; z-index: 1002; height: 360px; width: 600px; left: 50%; top: 50%; margin-left: -300px; margin-top: -180px;"&gt;&lt;div&gt;\</span></span><br><span class="line"><span class="string">                  &lt;em&gt;Select Student&lt;/em&gt;\</span></span><br><span class="line"><span class="string">                  &lt;select data-placeholder="Choose a Student..." class="chosen-select" style="width:350px;"&gt;\</span></span><br><span class="line"><span class="string">                    &lt;option value=""&gt;&lt;/option&gt;\</span></span><br><span class="line"><span class="string">                  &lt;/select&gt;\</span></span><br><span class="line"><span class="string">                &lt;/div&gt;&lt;/div&gt;'</span>);</span><br><span class="line">            $(<span class="string">"#simplemodal-overlay, #simplemodal-container"</span>).hide();</span><br><span class="line">            $(<span class="string">"#selectStudent"</span>).click(<span class="function"><span class="keyword">function</span>(<span class="params"></span>)</span>&#123;</span><br><span class="line">                $(<span class="string">"#simplemodal-overlay, #simplemodal-container"</span>).show();</span><br><span class="line">                queryApplication();</span><br><span class="line">            &#125;);</span><br><span class="line">            $(<span class="string">"#simplemodal-overlay"</span>).click(<span class="function"><span class="keyword">function</span>(<span class="params"></span>)</span>&#123;$(<span class="string">"#simplemodal-overlay, #simplemodal-container"</span>).hide();&#125;);</span><br><span class="line">        &#125; <span class="keyword">else</span> <span class="keyword">if</span>(pathname == <span class="string">"/index.cfm"</span> &amp;&amp; !search &amp;&amp; !$(<span class="string">".standardList"</span>).length)&#123;</span><br><span class="line">            addTips();</span><br><span class="line">            <span class="keyword">var</span> mMark = $(<span class="string">"#core_f10"</span>).val();</span><br><span class="line">            <span class="keyword">if</span>(!mMark)&#123;</span><br><span class="line">                <span class="built_in">console</span>.log(<span class="string">"leave"</span>);</span><br><span class="line">                <span class="keyword">return</span>;</span><br><span class="line">            &#125;</span><br><span class="line">            <span class="keyword">var</span> mEmail = mMark.trim();</span><br><span class="line">            get_course_application_info(mEmail, <span class="function"><span class="keyword">function</span>(<span class="params">mJson</span>)</span>&#123;</span><br><span class="line">                $(<span class="string">"#myTips"</span>).html(mJson.PersonalDetails.first_name + <span class="string">" "</span> + mJson.PersonalDetails.last_name+<span class="string">"'s Data has been loaded"</span>);</span><br><span class="line">                <span class="keyword">var</span> mDetails = mJson.PersonalDetails;</span><br><span class="line">                <span class="keyword">var</span> mCurrentContactDetails = mJson.CurrentContactDetails;</span><br><span class="line">                <span class="keyword">var</span> mPermanentContactDetails = mJson.PermanentContactDetails;</span><br><span class="line">                <span class="keyword">var</span> mLanguageProficiency = mJson.LanguageProficiency;</span><br><span class="line">                <span class="keyword">if</span>(mDetails.gender == <span class="string">"1"</span>)&#123;</span><br><span class="line">                    $(<span class="string">"label:contains('Male')"</span>).trigger(<span class="string">"click"</span>);</span><br><span class="line">                &#125; <span class="keyword">else</span>&#123;</span><br><span class="line">                    $(<span class="string">"label:contains('Female')"</span>).trigger(<span class="string">"click"</span>);</span><br><span class="line">                &#125;</span><br><span class="line">                <span class="keyword">var</span> cob = mDetails[<span class="string">"country_of_brith"</span>];</span><br><span class="line">                <span class="keyword">if</span>(cob)&#123;</span><br><span class="line">                    $(<span class="string">"#core_f1103 option:contains("</span>+cob+<span class="string">")"</span>).prop(<span class="string">"selected"</span>, <span class="literal">true</span>);</span><br><span class="line">                &#125;</span><br><span class="line">                <span class="comment">//签证</span></span><br><span class="line">                $(<span class="string">"#core_f142"</span>).val(mDetails.passport_number);</span><br><span class="line">                <span class="comment">//项目点联系方式</span></span><br><span class="line">                $(<span class="string">"#core_f13"</span>).val(mCurrentContactDetails.address);</span><br><span class="line">                $(<span class="string">"#core_f14"</span>).val(mCurrentContactDetails.city);</span><br><span class="line">                $(<span class="string">"#core_f139"</span>).val(mCurrentContactDetails.mobile_number);</span><br><span class="line">                <span class="keyword">if</span>(mCurrentContactDetails.province)&#123;</span><br><span class="line">                    $(<span class="string">"#core_f15 option:contains("</span>+mCurrentContactDetails.province+<span class="string">")"</span>).prop(<span class="string">"selected"</span>, <span class="literal">true</span>);</span><br><span class="line">                &#125;</span><br><span class="line">                <span class="comment">//家庭联系方式</span></span><br><span class="line">                $(<span class="string">"#core_f20"</span>).val(mPermanentContactDetails.address);</span><br><span class="line">                $(<span class="string">"#core_f21"</span>).val(mPermanentContactDetails.city);</span><br><span class="line">                $(<span class="string">"#core_f141"</span>).val(mPermanentContactDetails.mobile_number);</span><br><span class="line">                <span class="keyword">if</span>(mPermanentContactDetails.province)&#123;</span><br><span class="line">                    $(<span class="string">"#core_f22 option:contains("</span>+mPermanentContactDetails.province+<span class="string">")"</span>).prop(<span class="string">"selected"</span>, <span class="literal">true</span>);</span><br><span class="line">                &#125;</span><br><span class="line">                <span class="comment">//语言熟练程度</span></span><br><span class="line">                $(<span class="string">"#core_f118_name"</span>).val(mLanguageProficiency.english_exam_test_name);</span><br><span class="line">                <span class="keyword">var</span> mDate = mLanguageProficiency.date_English_exam_taken.split(<span class="string">"-"</span>);</span><br><span class="line">                $(<span class="string">"[name=core_f119_d]"</span>).val(<span class="built_in">parseInt</span>(mDate[<span class="number">2</span>]));</span><br><span class="line">                $(<span class="string">"[name=core_f119_m]"</span>).val(<span class="built_in">parseInt</span>(mDate[<span class="number">1</span>]));</span><br><span class="line">                $(<span class="string">"[name=core_f119_y]"</span>).val(mDate[<span class="number">0</span>]);</span><br><span class="line">                $(<span class="string">"#core_f1092"</span>).val(mLanguageProficiency.overall_score);</span><br><span class="line">                $(<span class="string">"#core_f1093"</span>).val(mLanguageProficiency.reading_score);</span><br><span class="line">                $(<span class="string">"#core_f1094"</span>).val(mLanguageProficiency.writing_score);</span><br><span class="line">                $(<span class="string">"#core_f1095"</span>).val(mLanguageProficiency.speaking_score);</span><br><span class="line">                $(<span class="string">"#core_f1096"</span>).val(mLanguageProficiency.listening_score);</span><br><span class="line"></span><br><span class="line">                <span class="keyword">var</span> applicantid = $(<span class="string">"[name=applicantid]"</span>).val();</span><br><span class="line">                sessionStorage.setItem(mEmail, <span class="built_in">JSON</span>.stringify(mJson));</span><br><span class="line">                sessionStorage.setItem(applicantid, <span class="built_in">JSON</span>.stringify(mJson));</span><br><span class="line">            &#125;);</span><br><span class="line"></span><br><span class="line">        &#125; <span class="keyword">else</span> <span class="keyword">if</span>(selectEvent == param2)&#123;</span><br><span class="line"><span class="comment">//            https://customer.studylink.com/index.cfm?event=course.select&amp;applicantid=2471372</span></span><br><span class="line">            <span class="keyword">var</span> applicantid = getURLParameter(<span class="string">"applicantid"</span>);</span><br><span class="line">            <span class="keyword">var</span> myInfo = sessionStorage.getItem(applicantid);</span><br><span class="line">            <span class="keyword">if</span>(myInfo)&#123;</span><br><span class="line">                addTips();</span><br><span class="line">                myInfo = <span class="built_in">JSON</span>.parse(myInfo);</span><br><span class="line">                fillInTips(myInfo);</span><br><span class="line">            &#125;</span><br><span class="line">        &#125; <span class="keyword">else</span> <span class="keyword">if</span>(searchEvent == param2)&#123;</span><br><span class="line"><span class="comment">//            https://customer.studylink.com/index.cfm?event=course.search.process</span></span><br><span class="line">            <span class="keyword">var</span> applicantid = $(<span class="string">"input[name=applicantid]"</span>).val();</span><br><span class="line">            <span class="keyword">var</span> myInfo = sessionStorage.getItem(applicantid);</span><br><span class="line">            <span class="keyword">if</span>(myInfo)&#123;</span><br><span class="line">                addTips();</span><br><span class="line">                myInfo = <span class="built_in">JSON</span>.parse(myInfo);</span><br><span class="line">                fillInTips(myInfo);</span><br><span class="line">            &#125;</span><br><span class="line">        &#125; <span class="keyword">else</span> <span class="keyword">if</span>(pathname == <span class="string">"/index.cfm"</span> &amp;&amp; (param2 == <span class="string">"application.create"</span> || param2 == <span class="string">"application.quickadd.continue"</span>))&#123;</span><br><span class="line">            addTips();</span><br><span class="line">            <span class="comment">//大学申请页面</span></span><br><span class="line">            <span class="keyword">var</span> mImg = $(<span class="string">"form table:first td:last img"</span>); <span class="comment">//        var mImg = $("form table tr:eq(0) td:nth-child(3)");</span></span><br><span class="line">            <span class="keyword">var</span> mUni = mImg.attr(<span class="string">"title"</span>);</span><br><span class="line">            <span class="built_in">console</span>.log(<span class="string">"大学是"</span>, mUni);</span><br><span class="line">            <span class="keyword">var</span> mEmail, myInfo;</span><br><span class="line">            <span class="keyword">try</span>&#123;</span><br><span class="line">                <span class="keyword">if</span>(mUni.indexOf(<span class="string">"Griffith University"</span>) &gt;= <span class="number">0</span>)&#123;</span><br><span class="line">    <span class="comment">//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Griffith University Start $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$</span></span><br><span class="line">                    mEmail = $(<span class="string">"#fieldInput_19"</span>).text().trim();</span><br><span class="line">                    <span class="built_in">console</span>.log(<span class="string">"邮箱"</span>, mEmail);</span><br><span class="line">                    myInfo = <span class="built_in">JSON</span>.parse(sessionStorage.getItem(mEmail));</span><br><span class="line">                    <span class="built_in">console</span>.log(myInfo);</span><br><span class="line">                    <span class="keyword">if</span>(!myInfo)&#123;</span><br><span class="line">                        <span class="built_in">console</span>.log(<span class="string">"nothing to do, return"</span>);</span><br><span class="line">                        <span class="keyword">return</span>;</span><br><span class="line">                    &#125;</span><br><span class="line">    <span class="comment">//****************************** Introduction******************************</span></span><br><span class="line">                    <span class="comment">//Have you applied to Griffith before</span></span><br><span class="line">                    <span class="comment">//$("#fieldID_261333_dt1[value=No]").prop("checked", true).trigger("click");</span></span><br><span class="line">                    $(<span class="string">"div.questionWrapper:contains('Have you applied to Griffith before')"</span>).next().find(<span class="string">"input[value=No]"</span>).prop(<span class="string">"checked"</span>, <span class="literal">true</span>).trigger(<span class="string">"click"</span>);</span><br><span class="line"></span><br><span class="line">    <span class="comment">//****************************** Personal details******************************</span></span><br><span class="line">                    <span class="comment">//Title</span></span><br><span class="line">                    <span class="keyword">var</span> mTitleSelect = $(<span class="string">"div.fieldWrapper:contains('Title')"</span>).filter(<span class="function"><span class="keyword">function</span>(<span class="params"> index </span>) </span>&#123;</span><br><span class="line">                                            <span class="keyword">return</span> $(<span class="keyword">this</span>).text().trim() == <span class="string">'Title:'</span>;</span><br><span class="line">                                          &#125;).parent().find(<span class="string">"select"</span>);</span><br><span class="line">                    <span class="keyword">if</span>(myInfo.PersonalDetails.title == <span class="string">"Mr"</span>)&#123;</span><br><span class="line">                        <span class="comment">//$("#fieldID_261336_dt1").val("Mister=Mr").trigger("change");</span></span><br><span class="line">                        mTitleSelect.val(<span class="string">"Mister=Mr"</span>).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    &#125; <span class="keyword">else</span> <span class="keyword">if</span>(myInfo.PersonalDetails.title == <span class="string">"Miss"</span>)&#123;</span><br><span class="line">                        <span class="comment">//$("#fieldID_261336_dt1").val("Miss=Miss").trigger("change");</span></span><br><span class="line">                        mTitleSelect.val(<span class="string">"Miss=Miss"</span>).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    &#125;</span><br><span class="line"></span><br><span class="line">                    <span class="comment">//Country of birth</span></span><br><span class="line">                    <span class="keyword">var</span> mCountry = $(<span class="string">"div.fieldWrapper:contains('Country of birth')"</span>).parent().find(<span class="string">"select option:contains("</span>+myInfo.PersonalDetails.citizenship+<span class="string">")"</span>);</span><br><span class="line">                    changeSelectTrue(mCountry);</span><br><span class="line"></span><br><span class="line">    <span class="comment">//****************************** Address for correspondence******************************</span></span><br><span class="line">                    <span class="keyword">var</span> mAddressParent = $(<span class="string">"legend:contains('Address for correspondence')"</span>).parent();</span><br><span class="line">                    <span class="comment">//Address Line 1</span></span><br><span class="line">                    <span class="keyword">var</span> mAddress1 = mAddressParent.find(<span class="string">"div.fieldWrapper:contains('Address Line 1')"</span>).next().find(<span class="string">"input"</span>);</span><br><span class="line">                    mAddress1.val(myInfo.CurrentContactDetails.address).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    <span class="comment">//City</span></span><br><span class="line">                    <span class="keyword">var</span> mCity = mAddressParent.find(<span class="string">"div.fieldWrapper:contains('City')"</span>).next().find(<span class="string">"input"</span>);</span><br><span class="line">                    mCity.val(myInfo.CurrentContactDetails.city).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    <span class="comment">//Phone Number</span></span><br><span class="line">                    <span class="keyword">var</span> mPhone = mAddressParent.find(<span class="string">"div.questionWrapper:contains('Phone Number')"</span>).next().find(<span class="string">"input"</span>);</span><br><span class="line">                    mPhone.first().val(<span class="string">"86"</span>).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    mPhone.last().val(myInfo.CurrentContactDetails.mobile_number).trigger(<span class="string">"change"</span>);</span><br><span class="line"></span><br><span class="line">    <span class="comment">//****************************** Permanent address in home country******************************</span></span><br><span class="line">                    <span class="keyword">var</span> mPermanentParent = $(<span class="string">"legend:contains('Permanent address in home country')"</span>).parent();</span><br><span class="line">                    <span class="keyword">var</span> mPmPhone = mPermanentParent.find(<span class="string">"div.questionWrapper:contains('Phone Number')"</span>).next().find(<span class="string">"input"</span>);</span><br><span class="line">                    mPmPhone.eq(<span class="number">0</span>).val(<span class="string">"86"</span>).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    mPmPhone.eq(<span class="number">1</span>).val(myInfo.PermanentContactDetails.mobile_number).trigger(<span class="string">"change"</span>);</span><br><span class="line"></span><br><span class="line">    <span class="comment">//****************************** English proficiency******************************</span></span><br><span class="line">                    <span class="keyword">var</span> mLang = $(<span class="string">"div.questionWrapper:contains('I have taken')"</span>).parent().find(<span class="string">"select option:contains("</span>+myInfo.LanguageProficiency.english_exam_test_name+<span class="string">")"</span>);</span><br><span class="line">                    changeSelectTrue(mLang);</span><br><span class="line">                    <span class="keyword">var</span> takenExamTime = myInfo.LanguageProficiency.date_English_exam_taken.split(<span class="string">"-"</span>);</span><br><span class="line">                    <span class="keyword">var</span> mLangSelect = $(<span class="string">"div.fieldWrapper:contains('Date of Test')"</span>).parent().find(<span class="string">"select"</span>);</span><br><span class="line">                    mLangSelect.eq(<span class="number">0</span>).val(takenExamTime[<span class="number">2</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    mLangSelect.eq(<span class="number">1</span>).val(takenExamTime[<span class="number">1</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    mLangSelect.eq(<span class="number">2</span>).val(takenExamTime[<span class="number">0</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line"></span><br><span class="line">    <span class="comment">//****************************** Educational background******************************</span></span><br><span class="line">                    <span class="comment">//$("div.questionWrapper:contains('Qualification 1')").parent().find("div.fieldWrapper:contains(' Degree/award:')").parent().find("input");</span></span><br><span class="line">                    <span class="keyword">var</span> lenQual = myInfo.Qualification.length;</span><br><span class="line">                    <span class="keyword">if</span>(lenQual &gt; <span class="number">0</span>)&#123;</span><br><span class="line">                        <span class="keyword">var</span> last = lenQual<span class="number">-1</span>;</span><br><span class="line">                        <span class="keyword">var</span> qualification1 = myInfo.Qualification[last];</span><br><span class="line">                        <span class="keyword">var</span> mQ1 = $(<span class="string">"div.questionWrapper:contains('Qualification 1')"</span>).parent();</span><br><span class="line">                        <span class="keyword">var</span> mQ1Text = mQ1.find(<span class="string">"input:text"</span>);</span><br><span class="line">                        mQ1Text.eq(<span class="number">0</span>).val(qualification1.degree).trigger(<span class="string">"change"</span>);</span><br><span class="line">                        mQ1Text.eq(<span class="number">1</span>).val(qualification1.Institution).trigger(<span class="string">"change"</span>);</span><br><span class="line">                        <span class="keyword">var</span> mQ1Select = mQ1.find(<span class="string">"select"</span>);</span><br><span class="line">                        <span class="keyword">var</span> mCountry = mQ1Select.eq(<span class="number">0</span>).find(<span class="string">"option:contains("</span>+qualification1.country+<span class="string">")"</span>);</span><br><span class="line">                        changeSelectTrue(mCountry);</span><br><span class="line">                        <span class="keyword">var</span> mStartDate = qualification1.start_date.split(<span class="string">"-"</span>);</span><br><span class="line">                        mQ1Select.eq(<span class="number">1</span>).val(mStartDate[<span class="number">1</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line">                        mQ1Select.eq(<span class="number">2</span>).val(mStartDate[<span class="number">0</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line">                        <span class="keyword">var</span> mEndDate = qualification1.end_date.split(<span class="string">"-"</span>);</span><br><span class="line">                        mQ1Select.eq(<span class="number">3</span>).val(mEndDate[<span class="number">1</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line">                        mQ1Select.eq(<span class="number">4</span>).val(mEndDate[<span class="number">0</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    &#125;</span><br><span class="line">                    <span class="keyword">if</span>(lenQual &amp;&amp; lenQual<span class="number">-1</span> &gt; <span class="number">0</span>)&#123;</span><br><span class="line">                        <span class="keyword">var</span> lastButTwo = lenQual<span class="number">-2</span>;</span><br><span class="line">                        <span class="keyword">var</span> qualification2 = myInfo.Qualification[lastButTwo];</span><br><span class="line">                        <span class="keyword">var</span> mQ2 = $(<span class="string">"div.questionWrapper:contains('Qualification 2')"</span>).parent();</span><br><span class="line">                        <span class="keyword">var</span> mQ2Text = mQ2.find(<span class="string">"input:text"</span>);</span><br><span class="line">                        mQ2Text.eq(<span class="number">0</span>).val(qualification2.degree).trigger(<span class="string">"change"</span>);</span><br><span class="line">                        mQ2Text.eq(<span class="number">1</span>).val(qualification2.Institution).trigger(<span class="string">"change"</span>);</span><br><span class="line">                        <span class="keyword">var</span> mQ2Select = mQ2.find(<span class="string">"select"</span>);</span><br><span class="line">                        <span class="keyword">var</span> mCountry = mQ2Select.eq(<span class="number">0</span>).find(<span class="string">"option:contains("</span>+qualification2.country+<span class="string">")"</span>);</span><br><span class="line">                        changeSelectTrue(mCountry);</span><br><span class="line">                        <span class="keyword">var</span> mStartDate = qualification2.start_date.split(<span class="string">"-"</span>);</span><br><span class="line">                        mQ2Select.eq(<span class="number">1</span>).val(mStartDate[<span class="number">1</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line">                        mQ2Select.eq(<span class="number">2</span>).val(mStartDate[<span class="number">0</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line">                        <span class="keyword">var</span> mEndDate = qualification2.end_date.split(<span class="string">"-"</span>);</span><br><span class="line">                        mQ2Select.eq(<span class="number">3</span>).val(mEndDate[<span class="number">1</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line">                        mQ2Select.eq(<span class="number">4</span>).val(mEndDate[<span class="number">0</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    &#125;</span><br><span class="line">                    <span class="keyword">var</span> mExcludedTertiary = $(<span class="string">"div.fieldWrapper:contains('excluded from previous')"</span>).parent().find(<span class="string">"input:radio[value=No]"</span>);</span><br><span class="line">                    clickRadio(mExcludedTertiary);</span><br><span class="line">    <span class="comment">//****************************** Credit for previous study******************************</span></span><br><span class="line">                    <span class="keyword">var</span> mExemption = $(<span class="string">"div.questionWrapper:contains('credit exemption')"</span>).parent().find(<span class="string">"input:radio[value=Yes]"</span>);</span><br><span class="line">                    clickRadio(mExemption);</span><br><span class="line"></span><br><span class="line">    <span class="comment">//****************************** Request for disability support******************************</span></span><br><span class="line">                    <span class="keyword">var</span> mDisability = $(<span class="string">"div.questionWrapper:contains('disability support')"</span>).parent().find(<span class="string">"input:radio[value=No]"</span>);</span><br><span class="line">                    clickRadio(mDisability);</span><br><span class="line"></span><br><span class="line">    <span class="comment">//****************************** Visa Application History******************************</span></span><br><span class="line">                    <span class="keyword">var</span> mVisaRejected = $(<span class="string">"div.questionWrapper:contains('visa application rejected')"</span>).parent().find(<span class="string">"input:radio[value=No]"</span>);</span><br><span class="line">                    clickRadio(mVisaRejected);</span><br><span class="line"></span><br><span class="line">    <span class="comment">//****************************** Overseas Student Health Cover******************************</span></span><br><span class="line">                    <span class="keyword">var</span> mHealthCover = $(<span class="string">"div.questionWrapper:contains('the type of cover')"</span>).parent();</span><br><span class="line">                    mHealthCover.find(<span class="string">"select option:contains("</span>+myInfo.OverseasStudentHealthCover.health_cover+<span class="string">")"</span>).prop(<span class="string">"selected"</span>, <span class="literal">true</span>).trigger(<span class="string">"change"</span>);</span><br><span class="line"></span><br><span class="line">    <span class="comment">//****************************** Financial support******************************</span></span><br><span class="line">                    <span class="keyword">var</span> mFinancial = $(<span class="string">"div.questionWrapper:contains('financial support')"</span>).parent().find(<span class="string">"input:radio"</span>);</span><br><span class="line">                    <span class="keyword">if</span>(myInfo.Financialsupport.is_have_scholarship == <span class="string">"0"</span>)&#123;</span><br><span class="line">                        clickRadio(mFinancial.eq(<span class="number">0</span>));</span><br><span class="line">                    &#125; <span class="keyword">else</span>&#123;</span><br><span class="line">                        clickRadio(mFinancial.eq(<span class="number">1</span>));</span><br><span class="line">                    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="comment">//****************************** Agent Declaration and signature******************************</span></span><br><span class="line">                    $(<span class="string">"span:contains(I agree)"</span>).find(<span class="string">"input:checkbox"</span>).each(<span class="function"><span class="keyword">function</span>(<span class="params"></span>)</span>&#123;</span><br><span class="line">                        <span class="keyword">var</span> mChecked = $(<span class="keyword">this</span>).is(<span class="string">":checked"</span>);</span><br><span class="line">                        mChecked?<span class="string">""</span>:$(<span class="keyword">this</span>).trigger(<span class="string">"click"</span>);</span><br><span class="line">                    &#125;);</span><br><span class="line">                    <span class="keyword">var</span> mAgentName = $(<span class="string">"div.fieldWrapper:contains(Agent's Name)"</span>).parent().find(<span class="string">"input:text"</span>);</span><br><span class="line">                    mAgentName.val(<span class="string">"Australia Education Management Group"</span>).trigger(<span class="string">"change"</span>);</span><br><span class="line"></span><br><span class="line">    <span class="comment">//****************************** Declaration and signature******************************</span></span><br><span class="line">                    <span class="keyword">var</span> mUnder18 = $(<span class="string">"div.fieldWrapper:contains('under 18 years')"</span>).parent().find(<span class="string">"input:radio[value='No']"</span>);</span><br><span class="line">                    clickRadio(mUnder18);</span><br><span class="line">                    <span class="keyword">var</span> mSignature = myInfo.PersonalDetails.first_name + <span class="string">" "</span> + myInfo.PersonalDetails.last_name;</span><br><span class="line">                    $(<span class="string">"div.fieldWrapper:contains('Applicant\'s')"</span>).parent().find(<span class="string">"input:text"</span>).val(mSignature).trigger(<span class="string">"change"</span>);</span><br><span class="line">    <span class="comment">//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Griffith University END $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$</span></span><br><span class="line">                &#125; <span class="keyword">else</span> <span class="keyword">if</span>(mUni.indexOf(<span class="string">"Tasmania"</span>) &gt;= <span class="number">0</span>)&#123;</span><br><span class="line">    <span class="comment">//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Tasmania University $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$</span></span><br><span class="line">                    mEmail = $(<span class="string">"#fieldInput_22"</span>).text().trim();</span><br><span class="line">                    <span class="built_in">console</span>.log(<span class="string">"邮箱"</span>, mEmail);</span><br><span class="line">                    myInfo = <span class="built_in">JSON</span>.parse(sessionStorage.getItem(mEmail));</span><br><span class="line">                    <span class="built_in">console</span>.log(myInfo);</span><br><span class="line">                    <span class="keyword">if</span>(!myInfo)&#123;</span><br><span class="line">                        <span class="built_in">console</span>.log(<span class="string">"nothing to do, return"</span>);</span><br><span class="line">                        <span class="keyword">return</span>;</span><br><span class="line">                    &#125;</span><br><span class="line">                    <span class="keyword">if</span>(myInfo.PersonalDetails.title == <span class="string">"Mr"</span>)&#123;</span><br><span class="line">                        $(<span class="string">"#fieldID_302301_dt1"</span>).val(<span class="string">"Mr=MR"</span>).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    &#125; <span class="keyword">else</span> <span class="keyword">if</span>(myInfo.PersonalDetails.title == <span class="string">"Miss"</span>)&#123;</span><br><span class="line">                        $(<span class="string">"#fieldID_302301_dt1"</span>).val(<span class="string">"Miss=MISS"</span>).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    &#125;</span><br><span class="line">                    $(<span class="string">"#fieldID_302308_dt1"</span>).val(myInfo.PermanentContactDetails.city).trigger(<span class="string">"change"</span>); <span class="comment">//birth city</span></span><br><span class="line">                    $(<span class="string">"#fieldID_302310_dt1 option:contains("</span>+myInfo.PersonalDetails.citizenship+<span class="string">")"</span>).prop(<span class="string">"selected"</span>, <span class="literal">true</span>).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    $(<span class="string">"#fieldID_302313_dt1[value=No]"</span>).prop(<span class="string">"checked"</span>, <span class="literal">true</span>).trigger(<span class="string">"click"</span>); <span class="comment">//student ID in Tasmania</span></span><br><span class="line">                     <span class="comment">//disability support</span></span><br><span class="line">                    <span class="keyword">if</span>(myInfo.RequestForDisabilitySupport.is_need_disability_support == <span class="string">"1"</span>)&#123;</span><br><span class="line">                        $(<span class="string">"#fieldID_302316_dt1[value=Yes]"</span>).prop(<span class="string">"checked"</span>, <span class="literal">true</span>).trigger(<span class="string">"click"</span>);</span><br><span class="line">                    &#125;<span class="keyword">else</span>&#123;</span><br><span class="line">                        $(<span class="string">"#fieldID_302316_dt1[value=No]"</span>).prop(<span class="string">"checked"</span>, <span class="literal">true</span>).trigger(<span class="string">"click"</span>);</span><br><span class="line">                    &#125;</span><br><span class="line"></span><br><span class="line">                    $(<span class="string">"#fieldID_302319_dt1"</span>).val(myInfo.PermanentContactDetails.address).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    $(<span class="string">"#fieldID_302321_dt1"</span>).val(myInfo.PermanentContactDetails.city).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    $(<span class="string">"#fieldID_302324_dt1"</span>).val(myInfo.PermanentContactDetails.mobile_number).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    $(<span class="string">"#fieldID_302418_dt1[value=Yes]"</span>).prop(<span class="string">"checked"</span>, <span class="literal">true</span>).trigger(<span class="string">"click"</span>);</span><br><span class="line">                    $(<span class="string">"#fieldID_302430_dt1[value=No]"</span>).prop(<span class="string">"checked"</span>, <span class="literal">true</span>).trigger(<span class="string">"click"</span>);</span><br><span class="line"></span><br><span class="line">                    $(<span class="string">"#fieldID_302426_dt1 option:contains("</span>+myInfo.LanguageProficiency.english_exam_test_name+<span class="string">")"</span>).prop(<span class="string">"selected"</span>, <span class="literal">true</span>);</span><br><span class="line">                    $(<span class="string">"#fieldID_302420_dt1"</span>).val(myInfo.LanguageProficiency.overall_score).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    $(<span class="string">"#fieldID_302421_dt1"</span>).val(myInfo.LanguageProficiency.writing_score).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    $(<span class="string">"#fieldID_302422_dt1"</span>).val(myInfo.LanguageProficiency.reading_score).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    $(<span class="string">"#fieldID_302423_dt1"</span>).val(myInfo.LanguageProficiency.listening_score).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    $(<span class="string">"#fieldID_302424_dt1"</span>).val(myInfo.LanguageProficiency.speaking_score).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    </span><br><span class="line">                    <span class="keyword">var</span> lenQual = myInfo.Qualification.length;</span><br><span class="line">                    <span class="comment">//secondary school</span></span><br><span class="line">                    <span class="keyword">if</span>(lenQual &gt; <span class="number">0</span>)&#123;</span><br><span class="line">                        <span class="keyword">var</span> last = lenQual<span class="number">-1</span>;</span><br><span class="line">                        $(<span class="string">"#fieldID_302432_dt1"</span>).val(myInfo.Qualification[last].Institution).trigger(<span class="string">"change"</span>);</span><br><span class="line">                        $(<span class="string">"#fieldID_302433_dt1"</span>).val(myInfo.Qualification[last].degree).trigger(<span class="string">"change"</span>);</span><br><span class="line">                        $(<span class="string">"#fieldID_302434_dt1 option:contains("</span>+myInfo.Qualification[last].country+<span class="string">")"</span>).prop(<span class="string">"selected"</span>, <span class="literal">true</span>).trigger(<span class="string">"change"</span>);</span><br><span class="line">                        <span class="keyword">var</span> mStartDate = myInfo.Qualification[last].start_date.split(<span class="string">"-"</span>);</span><br><span class="line">                        $(<span class="string">"#date_fieldID_302437_dt1_mm"</span>).val(mStartDate[<span class="number">1</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line">                        $(<span class="string">"#date_fieldID_302437_dt1_yyyy"</span>).val(mStartDate[<span class="number">0</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line">                        <span class="keyword">var</span> mEndDate = myInfo.Qualification[last].end_date.split(<span class="string">"-"</span>);</span><br><span class="line">                        $(<span class="string">"#date_fieldID_302438_dt1_mm"</span>).val(mEndDate[<span class="number">1</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line">                        $(<span class="string">"#date_fieldID_302438_dt1_yyyy"</span>).val(mEndDate[<span class="number">0</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line">                        $(<span class="string">"#fieldID_302440_dt1[value=Yes]"</span>).prop(<span class="string">"checked"</span>, <span class="literal">true</span>).trigger(<span class="string">"click"</span>);</span><br><span class="line">                    &#125;</span><br><span class="line">                    </span><br><span class="line"></span><br><span class="line">                    <span class="comment">//post secondary school</span></span><br><span class="line">                    <span class="keyword">if</span>(lenQual &amp;&amp; lenQual<span class="number">-1</span> &gt; <span class="number">0</span>)&#123;</span><br><span class="line">                        <span class="keyword">var</span> lastButTwo = lenQual<span class="number">-2</span>;</span><br><span class="line">                        $(<span class="string">"#fieldID_302444_dt1"</span>).val(myInfo.Qualification[lastButTwo].Institution).trigger(<span class="string">"change"</span>);</span><br><span class="line">                        $(<span class="string">"#fieldID_302445_dt1"</span>).val(myInfo.Qualification[lastButTwo].degree).trigger(<span class="string">"change"</span>);</span><br><span class="line">                        $(<span class="string">"#fieldID_302448_dt1 option:contains("</span>+myInfo.Qualification[lastButTwo].country+<span class="string">")"</span>).prop(<span class="string">"selected"</span>, <span class="literal">true</span>).trigger(<span class="string">"change"</span>);</span><br><span class="line">                        <span class="keyword">var</span> mPostSecondaryStartDate = myInfo.Qualification[lastButTwo].start_date.split(<span class="string">"-"</span>);</span><br><span class="line">                        $(<span class="string">"#date_fieldID_302450_dt1_mm"</span>).val(mPostSecondaryStartDate[<span class="number">1</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line">                        $(<span class="string">"#date_fieldID_302450_dt1_yyyy"</span>).val(mPostSecondaryStartDate[<span class="number">0</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line">                        <span class="keyword">var</span> mPostSecondaryEndDate = myInfo.Qualification[lastButTwo].end_date.split(<span class="string">"-"</span>);</span><br><span class="line">                        $(<span class="string">"#date_fieldID_302451_dt1_mm"</span>).val(mPostSecondaryEndDate[<span class="number">1</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line">                        $(<span class="string">"#date_fieldID_302451_dt1_yyyy"</span>).val(mPostSecondaryEndDate[<span class="number">0</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    &#125;</span><br><span class="line"></span><br><span class="line">                    <span class="comment">//VISA AND OTHER INFORMATION</span></span><br><span class="line">                    $(<span class="string">"#fieldID_302446_dt1 option:contains("</span>+ myInfo.Qualification[<span class="number">0</span>].degree +<span class="string">")"</span>).prop(<span class="string">"selected"</span>, <span class="literal">true</span>).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    $(<span class="string">"#fieldID_302452_dt1 option[value=Yes]"</span>).prop(<span class="string">"selected"</span>, <span class="literal">true</span>).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    <span class="keyword">if</span>(myInfo.CreditForPreviousStudy.is_credit_exemption == <span class="string">"1"</span>)&#123;</span><br><span class="line">                        $(<span class="string">"#fieldID_302452_dt1 option[value=Yes]"</span>).prop(<span class="string">"selected"</span>, <span class="literal">true</span>);</span><br><span class="line">                    &#125;</span><br><span class="line">                    $(<span class="string">"#fieldID_302503_dt1[value=No]"</span>).prop(<span class="string">"checked"</span>, <span class="literal">true</span>).trigger(<span class="string">"click"</span>); <span class="comment">//excluded from university</span></span><br><span class="line">                    $(<span class="string">"#fieldID_302507_dt1[value=No]"</span>).prop(<span class="string">"checked"</span>, <span class="literal">true</span>).trigger(<span class="string">"click"</span>); <span class="comment">//compelted course more than 6 months</span></span><br><span class="line">                    $(<span class="string">"#fieldID_302509_dt1[value=Yes]"</span>).prop(<span class="string">"checked"</span>, <span class="literal">true</span>).trigger(<span class="string">"click"</span>); <span class="comment">//passport</span></span><br><span class="line">                    $(<span class="string">"#fieldID_302510_dt1"</span>).val(myInfo.PassportAndVisaDetails.passport_number).trigger(<span class="string">"change"</span>);</span><br><span class="line">    <span class="comment">//                checkRadio("fieldID_302514_dt1", "No"); //valid visa</span></span><br><span class="line">                    <span class="keyword">var</span> passportExpiry = myInfo.PassportAndVisaDetails.passport_expiry_date.split(<span class="string">"-"</span>);</span><br><span class="line">                    $(<span class="string">"#date_fieldID_302511_dt6_dd"</span>).val(passportExpiry[<span class="number">2</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    $(<span class="string">"#date_fieldID_302511_dt6_mm"</span>).val(passportExpiry[<span class="number">1</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    $(<span class="string">"#date_fieldID_302511_dt6_yyyy"</span>).val(passportExpiry[<span class="number">0</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line"></span><br><span class="line">                    checkRadio(<span class="string">"fieldID_302524_dt1"</span>, <span class="string">"No"</span>);</span><br><span class="line"></span><br><span class="line">                    $(<span class="string">"#fieldID_302519_dt1[value=Yes]"</span>).prop(<span class="string">"checked"</span>, <span class="literal">true</span>).trigger(<span class="string">"click"</span>); <span class="comment">//student visa</span></span><br><span class="line">                    $(<span class="string">"#fieldID_302598_dt1[value='Family Support']"</span>).trigger(<span class="string">"click"</span>); <span class="comment">//financial</span></span><br><span class="line">                    $(<span class="string">"#fieldID_302600_dt1[value=Yes]"</span>).prop(<span class="string">"checked"</span>, <span class="literal">true</span>).trigger(<span class="string">"click"</span>); <span class="comment">//transfer funds</span></span><br><span class="line">                    $(<span class="string">"#fieldID_302601_dt1[value=Yes]"</span>).prop(<span class="string">"checked"</span>, <span class="literal">true</span>).trigger(<span class="string">"click"</span>); <span class="comment">//sufficient funds</span></span><br><span class="line">                    $(<span class="string">"#fieldID_302602_dt1[value=No]"</span>).prop(<span class="string">"checked"</span>, <span class="literal">true</span>).trigger(<span class="string">"click"</span>); <span class="comment">//other Award</span></span><br><span class="line">                    $(<span class="string">"#fieldID_302605_dt1[value=No]"</span>).prop(<span class="string">"checked"</span>, <span class="literal">true</span>).trigger(<span class="string">"click"</span>); <span class="comment">//brother enrolled</span></span><br><span class="line">                    checkRadio(<span class="string">"fieldID_302626_dt1"</span>, <span class="string">"No"</span>); <span class="comment">//authorize permission</span></span><br><span class="line">                    <span class="keyword">if</span>(!$(<span class="string">"#checked302632"</span>).is(<span class="string">":checked"</span>))&#123;</span><br><span class="line">                        $(<span class="string">"#checked302632"</span>).trigger(<span class="string">"click"</span>);</span><br><span class="line">                    &#125;</span><br><span class="line">                    <span class="keyword">var</span> signature = myInfo.PersonalDetails.first_name + <span class="string">" "</span> + myInfo.PersonalDetails.last_name;</span><br><span class="line">                    $(<span class="string">"#fieldID_302633_dt1"</span>).val(signature).trigger(<span class="string">"change"</span>);</span><br><span class="line">    <span class="comment">//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Tasmania University END $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$</span></span><br><span class="line">                &#125; <span class="keyword">else</span> <span class="keyword">if</span>(mUni.indexOf(<span class="string">"Australian National University"</span>) &gt;= <span class="number">0</span>)&#123;</span><br><span class="line">    <span class="comment">//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Australian National University $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$</span></span><br><span class="line">                    mEmail = $(<span class="string">"#fieldInput_21"</span>).text().trim();</span><br><span class="line">                    <span class="built_in">console</span>.log(<span class="string">"邮箱"</span>, mEmail);</span><br><span class="line">                    myInfo = <span class="built_in">JSON</span>.parse(sessionStorage.getItem(mEmail));</span><br><span class="line">                    <span class="built_in">console</span>.log(myInfo);</span><br><span class="line">                    <span class="keyword">if</span>(!myInfo)&#123;</span><br><span class="line">                        <span class="built_in">console</span>.log(<span class="string">"nothing to do, return"</span>);</span><br><span class="line">                        <span class="keyword">return</span>;</span><br><span class="line">                    &#125;</span><br><span class="line">                    <span class="comment">// title</span></span><br><span class="line">                    <span class="keyword">if</span>(myInfo.PersonalDetails.title == <span class="string">"Mr"</span>)&#123;</span><br><span class="line">                        $(<span class="string">"#fieldID_299666_dt1 option[value='Mr=Mr']"</span>).prop(<span class="string">"selected"</span>, <span class="literal">true</span>).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    &#125; <span class="keyword">else</span>&#123;</span><br><span class="line">                        checkSelect(<span class="string">"fieldID_299666_dt1"</span>, myInfo.PersonalDetails.title);</span><br><span class="line">                    &#125;</span><br><span class="line">                    <span class="comment">// study in ANU before</span></span><br><span class="line">                    checkRadio(<span class="string">"fieldID_299668_dt1"</span>, <span class="string">"No"</span>);</span><br><span class="line">                    <span class="comment">// disability</span></span><br><span class="line">                    <span class="keyword">if</span>(myInfo.RequestForDisabilitySupport.is_need_disability_support == <span class="string">"0"</span>)&#123;</span><br><span class="line">                        checkRadio(<span class="string">"fieldID_299675_dt1"</span>, <span class="string">"No"</span>);</span><br><span class="line">                    &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">                        checkRadio(<span class="string">"fieldID_299675_dt1"</span>);</span><br><span class="line">                    &#125;</span><br><span class="line">                    <span class="comment">// Postal Address</span></span><br><span class="line">                    checkSelect(<span class="string">"fieldID_299678_dt1"</span>, myInfo.CurrentContactDetails.country);</span><br><span class="line">                    <span class="comment">// permanent home address</span></span><br><span class="line">                    checkSelect(<span class="string">"fieldID_299686_dt1"</span>, myInfo.PermanentContactDetails.country);</span><br><span class="line">                    $(<span class="string">"#fieldID_299687_dt1"</span>).val(myInfo.PermanentContactDetails.address).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    $(<span class="string">"#fieldID_299690_dt1"</span>).val(myInfo.PermanentContactDetails.city).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    <span class="comment">//humanitarian visa</span></span><br><span class="line">                    checkRadio(<span class="string">"fieldID_299697_dt1"</span>, <span class="string">"No"</span>);</span><br><span class="line">                    <span class="comment">//citizenship status</span></span><br><span class="line">                    checkSelect(<span class="string">"fieldID_299698_dt1"</span>, <span class="string">"other than"</span>);</span><br><span class="line">                    <span class="comment">//Australian Aboriginal</span></span><br><span class="line">                    checkSelect(<span class="string">"fieldID_299699_dt1"</span>, <span class="string">"No"</span>);</span><br><span class="line">                    <span class="comment">//6 months</span></span><br><span class="line">                    checkRadio(<span class="string">"fieldID_299704_dt1"</span>);</span><br><span class="line">                    <span class="comment">//expiry date</span></span><br><span class="line">                    <span class="keyword">var</span> mExpiry = myInfo.PassportAndVisaDetails.passport_expiry_date.split(<span class="string">"-"</span>);</span><br><span class="line">                    $(<span class="string">"#date_fieldID_299706_dt6_dd"</span>).val(mExpiry[<span class="number">2</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    $(<span class="string">"#date_fieldID_299706_dt6_mm"</span>).val(mExpiry[<span class="number">1</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    $(<span class="string">"#date_fieldID_299706_dt6_yyyy"</span>).val(mExpiry[<span class="number">0</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    <span class="comment">//breached</span></span><br><span class="line">                    checkRadio(<span class="string">"fieldID_299713_dt1"</span>, <span class="string">"No"</span>);</span><br><span class="line">                    <span class="comment">//convicted</span></span><br><span class="line">                    checkRadio(<span class="string">"fieldID_299715_dt1"</span>, <span class="string">"No"</span>);</span><br><span class="line">                    <span class="comment">//English Language Proficiency</span></span><br><span class="line">                    checkSelect(<span class="string">"fieldID_299744_dt1"</span>, <span class="string">"English language test"</span>);</span><br><span class="line">                    checkRadio(<span class="string">"fieldID_299746_dt1"</span>);</span><br><span class="line">                    checkSelect(<span class="string">"fieldID_299748_dt1"</span>, myInfo.LanguageProficiency.english_exam_test_name);</span><br><span class="line">                    <span class="keyword">var</span> takenDate = myInfo.LanguageProficiency.date_English_exam_taken.split(<span class="string">"-"</span>);</span><br><span class="line">                    $(<span class="string">"#date_fieldID_299749_dt6_dd option[value="</span>+takenDate[<span class="number">2</span>]+<span class="string">"]"</span>).prop(<span class="string">"selected"</span>, <span class="literal">true</span>).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    $(<span class="string">"#date_fieldID_299749_dt6_mm option[value="</span>+takenDate[<span class="number">1</span>]+<span class="string">"]"</span>).prop(<span class="string">"selected"</span>, <span class="literal">true</span>).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    $(<span class="string">"#date_fieldID_299749_dt6_yyyy option[value="</span>+takenDate[<span class="number">0</span>]+<span class="string">"]"</span>).prop(<span class="string">"selected"</span>, <span class="literal">true</span>).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    $(<span class="string">"#fieldID_299750_dt1"</span>).val(myInfo.LanguageProficiency.overall_score).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    $(<span class="string">"#fieldID_299751_dt1"</span>).val(myInfo.LanguageProficiency.reading_score).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    $(<span class="string">"#fieldID_299752_dt1"</span>).val(myInfo.LanguageProficiency.writing_score).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    $(<span class="string">"#fieldID_299753_dt1"</span>).val(myInfo.LanguageProficiency.speaking_score).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    $(<span class="string">"#fieldID_299754_dt1"</span>).val(myInfo.LanguageProficiency.listening_score).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    <span class="comment">//degree</span></span><br><span class="line">                    checkSelect(<span class="string">"fieldID_299780_dt1"</span>, myInfo.Qualification[<span class="number">0</span>].degree.toUpperCase());</span><br><span class="line">                    <span class="keyword">var</span> mStartDate = myInfo.Qualification[<span class="number">0</span>].start_date.split(<span class="string">"-"</span>);</span><br><span class="line">                    $(<span class="string">"#date_fieldID_299774_dt1_mm"</span>).val(mStartDate[<span class="number">1</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    $(<span class="string">"#date_fieldID_299774_dt1_yyyy"</span>).val(mStartDate[<span class="number">0</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    <span class="keyword">var</span> mEndDate = myInfo.Qualification[<span class="number">0</span>].end_date.split(<span class="string">"-"</span>);</span><br><span class="line">                    $(<span class="string">"#date_fieldID_299775_dt1_mm"</span>).val(mEndDate[<span class="number">1</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    $(<span class="string">"#date_fieldID_299775_dt1_yyyy"</span>).val(mEndDate[<span class="number">0</span>]).trigger(<span class="string">"change"</span>);</span><br><span class="line"></span><br><span class="line">                    <span class="keyword">if</span>(myInfo.RequestForDisabilitySupport.is_have_visa_reject == <span class="string">"0"</span>)&#123;</span><br><span class="line">                        checkRadio(<span class="string">"fieldID_299836_dt1"</span>, <span class="string">"No"</span>);</span><br><span class="line">                    &#125; <span class="keyword">else</span>&#123;</span><br><span class="line">                        checkRadio(<span class="string">"fieldID_299836_dt1"</span>);</span><br><span class="line">                    &#125;</span><br><span class="line">                    <span class="keyword">if</span>(myInfo.Financialsupport.is_have_scholarship == <span class="string">"0"</span>)&#123;</span><br><span class="line">                        checkRadio(<span class="string">"fieldID_299741_dt1"</span>, <span class="string">"Self Funded"</span>);</span><br><span class="line">                    &#125;</span><br><span class="line">                    <span class="comment">//certify</span></span><br><span class="line">                    <span class="keyword">var</span> isDeclareChecked = $(<span class="string">"#checked299924"</span>).is(<span class="string">":checked"</span>);</span><br><span class="line">                    <span class="keyword">if</span>(!isDeclareChecked)&#123;</span><br><span class="line">                        $(<span class="string">"#checked299924"</span>).trigger(<span class="string">"click"</span>);</span><br><span class="line">                    &#125;</span><br><span class="line">                    isDeclareChecked = $(<span class="string">"#checked299925"</span>).is(<span class="string">":checked"</span>);</span><br><span class="line">                    <span class="keyword">if</span>(!isDeclareChecked)&#123;</span><br><span class="line">                        $(<span class="string">"#checked299925"</span>).trigger(<span class="string">"click"</span>);</span><br><span class="line">                    &#125;</span><br><span class="line">                    isDeclareChecked = $(<span class="string">"#checked299926"</span>).is(<span class="string">":checked"</span>);</span><br><span class="line">                    <span class="keyword">if</span>(!isDeclareChecked)&#123;</span><br><span class="line">                        $(<span class="string">"#checked299926"</span>).trigger(<span class="string">"click"</span>);</span><br><span class="line">                    &#125;</span><br><span class="line">                    isDeclareChecked = $(<span class="string">"#checked299928"</span>).is(<span class="string">":checked"</span>);</span><br><span class="line">                    <span class="keyword">if</span>(!isDeclareChecked)&#123;</span><br><span class="line">                        $(<span class="string">"#checked299928"</span>).trigger(<span class="string">"click"</span>);</span><br><span class="line">                    &#125;</span><br><span class="line">                    <span class="keyword">if</span>(!$(<span class="string">"#checked299929"</span>).is(<span class="string">":checked"</span>))&#123;</span><br><span class="line">                        $(<span class="string">"#checked299929"</span>).trigger(<span class="string">"click"</span>);</span><br><span class="line">                    &#125;</span><br><span class="line">                    <span class="keyword">if</span>(!$(<span class="string">"#checked299930"</span>).is(<span class="string">":checked"</span>))&#123;</span><br><span class="line">                        $(<span class="string">"#checked299930"</span>).trigger(<span class="string">"click"</span>);</span><br><span class="line">                    &#125;</span><br><span class="line">                    <span class="keyword">if</span>(!$(<span class="string">"#checked299931"</span>).is(<span class="string">":checked"</span>))&#123;</span><br><span class="line">                        $(<span class="string">"#checked299931"</span>).trigger(<span class="string">"click"</span>);</span><br><span class="line">                    &#125;</span><br><span class="line">                    <span class="keyword">if</span>(!$(<span class="string">"#checked299932"</span>).is(<span class="string">":checked"</span>))&#123;</span><br><span class="line">                        $(<span class="string">"#checked299932"</span>).trigger(<span class="string">"click"</span>);</span><br><span class="line">                    &#125;</span><br><span class="line">                    <span class="keyword">if</span>(!$(<span class="string">"#checked302231"</span>).is(<span class="string">":checked"</span>))&#123;</span><br><span class="line">                        $(<span class="string">"#checked302231"</span>).trigger(<span class="string">"click"</span>);</span><br><span class="line">                    &#125;</span><br><span class="line"></span><br><span class="line">                    <span class="keyword">var</span> mDate = <span class="keyword">new</span> <span class="built_in">Date</span>();</span><br><span class="line">                    <span class="keyword">var</span> mDay = mDate.getDate();</span><br><span class="line">                    <span class="keyword">if</span>(mDay &lt; <span class="number">10</span>)&#123;</span><br><span class="line">                        mDay = <span class="string">"0"</span> + mDay;</span><br><span class="line">                    &#125;</span><br><span class="line">                    <span class="keyword">var</span> mMonth = mDate.getMonth();</span><br><span class="line">                    <span class="keyword">if</span>(mMonth &lt; <span class="number">9</span>)&#123;</span><br><span class="line">                        mMonth += <span class="number">1</span>;</span><br><span class="line">                        mMonth = <span class="string">"0"</span> + mMonth;</span><br><span class="line">                    &#125; <span class="keyword">else</span>&#123;</span><br><span class="line">                        mMonth += <span class="number">1</span>;</span><br><span class="line">                    &#125;</span><br><span class="line">                    $(<span class="string">"#date_fieldID_299935_dt6_dd option[value="</span>+mDay+<span class="string">"]"</span>).prop(<span class="string">"selected"</span>, <span class="literal">true</span>).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    $(<span class="string">"#date_fieldID_299935_dt6_mm option[value="</span>+mMonth+<span class="string">"]"</span>).prop(<span class="string">"selected"</span>, <span class="literal">true</span>).trigger(<span class="string">"change"</span>);</span><br><span class="line">                    $(<span class="string">"#date_fieldID_299935_dt6_yyyy option[value="</span>+mDate.getFullYear()+<span class="string">"]"</span>).prop(<span class="string">"selected"</span>, <span class="literal">true</span>).trigger(<span class="string">"change"</span>);</span><br><span class="line">    <span class="comment">//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Australian National University END $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$</span></span><br><span class="line">                &#125;</span><br><span class="line">                <span class="comment">//提示信息</span></span><br><span class="line">                fillInTips(myInfo);</span><br><span class="line"></span><br><span class="line">            &#125;<span class="keyword">catch</span>(e)&#123;</span><br><span class="line">                <span class="built_in">console</span>.error(e);</span><br><span class="line">            &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">        &#125;</span><br><span class="line">    &#125;);</span><br><span class="line"></span><br><span class="line">&#125;)(jQuery);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">//window.onbeforeunload = function(e) &#123;</span></span><br><span class="line"><span class="comment">//  return ("onbeforeunload");</span></span><br><span class="line"><span class="comment">//&#125;;</span></span><br></pre></td></tr></table></figure>
      
    </div>
    
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2017/05/04/js-clone/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption"><</strong>
      <div class="article-nav-title">
        
          JavaScript Object Clone
        
      </div>
    </a>
  
  
    <a href="/2017/02/21/js-property/" id="article-nav-older" class="article-nav-link-wrap">
      <div class="article-nav-title">The Difference Between __proto__ And prototype</div>
      <strong class="article-nav-caption">></strong>
    </a>
  
</nav>

  
</article>


<div class="share_jia">
	<!-- JiaThis Button BEGIN -->
	<div class="jiathis_style">
		<span class="jiathis_txt">Share to: &nbsp; </span>
		<a class="jiathis_button_facebook"></a> 
    <a class="jiathis_button_twitter"></a>
    <a class="jiathis_button_plus"></a> 
    <a class="jiathis_button_tsina"></a>
		<a class="jiathis_button_cqq"></a>
		<a class="jiathis_button_douban"></a>
		<a class="jiathis_button_weixin"></a>
		<a class="jiathis_button_tumblr"></a>
    <a href="http://www.jiathis.com/share" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
	</div>
	<script type="text/javascript" src="http://v3.jiathis.com/code/jia.js?uid=1405949716054953" charset="utf-8"></script>
	<!-- JiaThis Button END -->
</div>






<div class="duoshuo">
	<!-- 多说评论框 start -->
	<div class="ds-thread" data-thread-key="tampermonkey-script" data-title="Tampermonkey Script" data-url="http://dontcry2013.github.io/2017/03/31/tampermonkey-script/"></div>
	<!-- 多说评论框 end -->
	<!-- 多说公共JS代码 start (一个网页只需插入一次) -->
	<script type="text/javascript">
	var duoshuoQuery = {short_name:"true"};
	(function() {
		var ds = document.createElement('script');
		ds.type = 'text/javascript';ds.async = true;
		ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
		ds.charset = 'UTF-8';
		(document.getElementsByTagName('head')[0] 
		 || document.getElementsByTagName('body')[0]).appendChild(ds);
	})();
	</script>
	<!-- 多说公共JS代码 end -->
</div>




</div>
      <footer id="footer">
  <div class="outer">
    <div id="footer-info">
    	<div class="footer-left">
    		&copy; 2019 Zachary
    	</div>
      	<div class="footer-right">
      		<a href="http://hexo.io/" target="_blank">Hexo</a>  Theme <a href="https://github.com/litten/hexo-theme-yilia" target="_blank">Yilia</a> by Litten
      	</div>
    </div>
  </div>
</footer>
    </div>
    
  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">


<script>
	var yiliaConfig = {
		fancybox: true,
		mathjax: true,
		animate: true,
		isHome: false,
		isPost: true,
		isArchive: false,
		isTag: false,
		isCategory: false,
		open_in_new: false
	}
</script>
<script src="http://7.url.cn/edu/jslib/comb/require-2.1.6,jquery-1.9.1.min.js"></script>
<script src="/js/main.js"></script>






<script type="text/x-mathjax-config">
MathJax.Hub.Config({
    tex2jax: {
        inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
        processEscapes: true,
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
    }
});

MathJax.Hub.Queue(function() {
    var all = MathJax.Hub.getAllJax(), i;
    for(i=0; i < all.length; i += 1) {
        all[i].SourceElement().parentNode.className += ' has-jax';                 
    }       
});
</script>

<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>


  </div>
</body>
</html>